import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.multimedia.media.d.ts',
  content: "/*\n* Copyright (C) 2021-2024 Huawei Device Co., Ltd.\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n * @file\n * @kit MediaKit\n */\nimport { ErrorCallback, AsyncCallback, Callback } from './@ohos.base';\nimport audio from './@ohos.multimedia.audio';\nimport photoAccessHelper from './@ohos.file.photoAccessHelper';\nimport type image from './@ohos.multimedia.image';\nimport type { SoundPool as _SoundPool } from './multimedia/soundPool';\nimport type { PlayParameters as _PlayParameters } from './multimedia/soundPool';\nimport type drm from './@ohos.multimedia.drm';\n/**\n * @namespace media\n * @since 6\n */\n/**\n * @namespace media\n * @atomicservice\n * @since 11\n */\n/**\n * The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and\n * use media resources.\n *\n * @namespace media\n * @syscap SystemCapability.Multimedia.Media.Core\n * @crossplatform\n * @atomicservice\n * @since 12\n */\ndeclare namespace media {\n    /**\n     * Creates an AVPlayer instance.\n     * @param { AsyncCallback<AVPlayer> } callback - used to return AVPlayer instance if the operation is successful; returns null otherwise.\n     * The instance can be used to play audio and video.\n     * @throws { BusinessError } 5400101 - No memory. Return by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @since 9\n     */\n    /**\n     * Creates an AVPlayer instance.\n     * @param { AsyncCallback<AVPlayer> } callback - used to return AVPlayer instance if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Return by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Creates an **AVPlayer** instance. This API uses an asynchronous callback to return the result.\n     * <br>**NOTE:**<br>\n     * You are advised to create a maximum of 16 **AVPlayer** instances for an application in both audio and video\n     * playback scenarios.\n     *\n     * The actual number of instances that can be created may be different.\n     * It depends on the specifications of the device chip in use.\n     *\n     * @param { AsyncCallback<AVPlayer> } callback - used to return the result. If the operation is successful, an\n     * **AVPlayer** instance is returned; otherwise, **null** is returned. The instance can be used to play\n     * audio and video.\n     * @throws { BusinessError } 5400101 - No memory. Return by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    function createAVPlayer(callback: AsyncCallback<AVPlayer>): void;\n    /**\n     * Creates an AVPlayer instance. This API uses a promise to return the result.\n     * @returns { Promise<AVPlayer> } A Promise instance used to return AVPlayer instance if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @since 9\n     */\n    /**\n     * Creates an AVPlayer instance. This API uses a promise to return the result.\n     * @returns { Promise<AVPlayer> } A Promise instance used to return AVPlayer instance if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Creates an **AVPlayer** instance. This API uses a promise to return the result.\n     * <br>**NOTE:**<br>\n     * You are advised to create a maximum of 16 **AVPlayer** instances for an application in both audio and video\n     * playback scenarios.\n     *\n     * The actual number of instances that can be created may be different. It depends on the specifications of\n     * the device chip in use.\n     *\n     * @returns { Promise<AVPlayer> } Callback used to return the result. If the operation is successful, an\n     * **AVPlayer** instance is returned; **null** is returned otherwise. The instance can be used to play\n     * audio and video.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    function createAVPlayer(): Promise<AVPlayer>;\n    /**\n     * Creates an AVRecorder instance.\n     * @param { AsyncCallback<AVRecorder> } callback - used to return AVRecorder instance if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Return by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Creates an **AVRecorder** instance. This API uses an asynchronous callback to return the result.\n     * @param { AsyncCallback<AVRecorder> } callback - Callback used to return the result. If the operation is successful,\n     * an **AVRecorder** instance is returned; otherwise, **null** is returned. The instance can be used to record audio\n     * and video.\n     * @throws { BusinessError } 5400101 - No memory. Return by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @since 12\n     */\n    function createAVRecorder(callback: AsyncCallback<AVRecorder>): void;\n    /**\n     * Creates an AVRecorder instance.\n     * @returns { Promise<AVRecorder> } A Promise instance used to return AVRecorder instance if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Creates an **AVRecorder** instance. This API uses a promise to return the result.\n     * @returns { Promise<AVRecorder> } Promise used to return the result. If the operation is successful,\n     * an **AVRecorder** instance is returned; otherwise, **null** is returned.\n     * The instance can be used to record audio and video.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    function createAVRecorder(): Promise<AVRecorder>;\n    /**\n     * Creates an AudioPlayer instance.\n     * @returns { AudioPlayer } Returns an AudioPlayer instance if the operation is successful; returns null otherwise.\n     * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n     * @since 6\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media#createAVPlayer\n     */\n    function createAudioPlayer(): AudioPlayer;\n    /**\n     * Creates an AudioRecorder instance.\n     * @returns { AudioRecorder } Returns an AudioRecorder instance if the operation is successful; returns null otherwise.\n     * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n     * @since 6\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media#createAVRecorder\n     */\n    function createAudioRecorder(): AudioRecorder;\n    /**\n     * Create MediaSource from url.\n     * @param { string } url : The location for the media source.\n     * @param { Record<string, string> } headers : Headers attached to network request while player request data.\n     * @returns { MediaSource } MediaSource instance if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n     * @throws { BusinessError } 5400101 - No memory.\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 12\n     */\n    /**\n     * Creates a media source for streaming media to be pre-downloaded.\n     * @param { string } url : Url of the media source. The following streaming media formats are supported: HLS,\n     *  HTTP-FLV, DASH, and HTTPS.\n     * @param { Record<string, string> } headers : Headers attached to network request while player request data.\n     * @returns { MediaSource } MediaSource instance if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n     * @throws { BusinessError } 5400101 - No memory.\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 13\n     */\n    function createMediaSourceWithUrl(url: string, headers?: Record<string, string>): MediaSource;\n    /**\n    * Creates a multi-bitrate media source for streaming media. Currently, only the HTTP-FLV multi-bitrate\n    * media source is supported.\n    * @param { Array<MediaStream> } streams - Array of MediaStream objects.\n    * The supported streaming media format is HTTP-FLV.\n    * @returns { MediaSource } MediaSource instance if the operation is successful; returns null otherwise.\n    * @syscap SystemCapability.Multimedia.Media.Core\n    * @atomicservice\n    * @since 19\n    */\n    function createMediaSourceWithStreamData(streams: Array<MediaStream>): MediaSource;\n    /**\n     * Creates an VideoPlayer instance.\n     * @param { AsyncCallback<VideoPlayer> } callback - used to return AudioPlayer instance if the operation is successful; returns null otherwise.\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media#createAVPlayer\n     */\n    function createVideoPlayer(callback: AsyncCallback<VideoPlayer>): void;\n    /**\n     * Creates an VideoPlayer instance.\n     * @returns { Promise<VideoPlayer> } A Promise instance used to return VideoPlayer instance if the operation is successful; returns null otherwise.\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media#createAVPlayer\n     */\n    function createVideoPlayer(): Promise<VideoPlayer>;\n    /**\n     * Creates a **SoundPool** instance. This API uses an asynchronous callback to return the result.\n     *\n     * **NOTE**\n     * - In versions earlier than API version 18, the bottom layer of the created **SoundPool** object is in singleton\n     * mode. Therefore, an application process can create only one **SoundPool** instance.\n     * - In API version 18 and later versions, the bottom layer of the created **SoundPool** object is in multiton mode.\n     * Therefore, an application process can create a maximum of 128 **SoundPool** instances.\n     *\n     * @param {number} maxStreams - Maximum number of streams that can be played by the **SoundPool** instance.\n     * The value is an integer ranging from 1 to 32.\n     * @param {audio.AudioRendererInfo} audioRenderInfo - Audio renderer parameters. When the **usage** parameter\n     * in **audioRenderInfo** is set to **STREAM_USAGE_UNKNOWN**, **STREAM_USAGE_MUSIC**, **STREAM_USAGE_MOVIE**, or\n     * **STREAM_USAGE_AUDIOBOOK**, the SoundPool uses the audio mixing mode when playing a short sound, without\n     * interrupting the playback of other audios.\n     * @param {AsyncCallback<SoundPool>} callback - Callback used to return the result. If the operation is successful, a\n     * **SoundPool** instance is returned; otherwise, **null** is returned.\n     * The instance is used for loading and playback.\n     * @throws { BusinessError } 5400101 - No memory. Return by callback.\n     * @syscap SystemCapability.Multimedia.Media.SoundPool\n     * @since 10\n     */\n    function createSoundPool(maxStreams: number, audioRenderInfo: audio.AudioRendererInfo, callback: AsyncCallback<SoundPool>): void;\n    /**\n     * Creates a **SoundPool** instance. This API uses a promise to return the result.\n     *\n     * **NOTE**\n     * - In versions earlier than API version 18, the bottom layer of the created **SoundPool** object is in singleton\n     * mode. Therefore, an application process can create only one **SoundPool** instance.\n     * - In API version 18 and later versions, the bottom layer of the created **SoundPool** object is in multiton mode.\n     * Therefore, an application process can create a maximum of 128 **SoundPool** instances.\n     *\n     * @param {number} maxStreams - Maximum number of streams that can be played by the **SoundPool** instance.\n     * The value is an integer ranging from 1 to 32.\n     * @param {audio.AudioRendererInfo} audioRenderInfo - Audio renderer parameters.\n     * @returns {Promise<SoundPool>} Promise used to return the result. If the operation is successful,\n     * a **SoundPool** instance is returned; otherwise, **null** is returned.\n     * The instance is used for loading and playback.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.SoundPool\n     * @since 10\n     */\n    function createSoundPool(maxStreams: number, audioRenderInfo: audio.AudioRendererInfo): Promise<SoundPool>;\n    /**\n     * Creates an **AVScreenCaptureRecorder** instance. This API uses a promise to return the result.\n     * @returns { Promise<AVScreenCaptureRecorder> } Promise used to return the result. If the operation is successful,\n     * an **AVScreenCaptureRecorder** instance is returned; otherwise, **null** is returned.\n     * The instance can be used for screen capture.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n     * @since 12\n     * @example\n     * import { BusinessError } from '@kit.BasicServicesKit';\n     *\n     * let avScreenCaptureRecorder: media.AVScreenCaptureRecorder;\n     * media.createAVScreenCaptureRecorder().then((captureRecorder: media.AVScreenCaptureRecorder) => {\n     *   if (captureRecorder != null) {\n     *     avScreenCaptureRecorder = captureRecorder;\n     *     console.info('Succeeded in createAVScreenCaptureRecorder');\n     *   } else {\n     *     console.error('Failed to createAVScreenCaptureRecorder');\n     *   }\n     * }).catch((error: BusinessError) => {\n     *   console.error(`createAVScreenCaptureRecorder catchCallback, error message:${error.message}`);\n     * });\n     */\n    function createAVScreenCaptureRecorder(): Promise<AVScreenCaptureRecorder>;\n    /**\n     * Creates an **AVTranscoder** instance. This API uses a promise to return the result.\n     *\n     * **NOTE**\n     *\n     * A maximum of 2 **AVTranscoder** instances can be created.\n     *\n     * @returns {Promise<AVTranscoder>} Promise used to return the result. If the operation is successful, an\n     * **AVTranscoder** instance is returned; otherwise, **null** is returned. The instance can be used for video\n     * transcoding.\n     * @throws { BusinessError } 5400101 - No memory. Return by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n     * @since 12\n     */\n    function createAVTranscoder(): Promise<AVTranscoder>;\n    /**\n     * Provides APIs for loading, unloading, playing, and stopping playing system sounds, setting the volume,\n     * and setting the number of loops.\n     *\n     * @typedef { _SoundPool }\n     * @syscap SystemCapability.Multimedia.Media.SoundPool\n     * @since 10\n     */\n    type SoundPool = _SoundPool;\n    /**\n     * Playback parameters of the sound pool.\n     *\n     * @typedef { _PlayParameters }\n     * @syscap SystemCapability.Multimedia.Media.SoundPool\n     * @since 10\n     */\n    type PlayParameters = _PlayParameters;\n    /**\n     * Enumerates state change reason.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 9\n     */\n    /**\n     * Enumerates state change reason.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Enumerates the reasons for the state transition of the **AVPlayer** or **AVRecorder** instance.\n     * The enum value is reported together with **state**.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum StateChangeReason {\n        /**\n         * State changed by user operation.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * State changed by user operation.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * State transition triggered by user behavior. It happens when a user or the client calls an API.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        USER = 1,\n        /**\n         * State changed by background action.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * State changed by background action.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * State transition caused by background system behavior. For example, if an application does not have the permission of\n         * Media Controller, the application is forcibly suspended or stopped by the system when it switches to the background.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        BACKGROUND = 2\n    }\n    /**\n     * Creates an AVMetadataExtractor instance.\n     * @returns { Promise<AVMetadataExtractor> } A Promise instance used to return AVMetadataExtractor instance\n     * if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Returned by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @since 11\n     */\n    /**\n     * Creates an **AVMetadataExtractor** instance. This API uses a promise to return the result.\n     * @returns { Promise<AVMetadataExtractor> } A Promise instance used to return AVMetadataExtractor instance\n     * if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Returned by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @crossplatform\n     * @since 12\n     */\n    function createAVMetadataExtractor(): Promise<AVMetadataExtractor>;\n    /**\n     * Creates an AVMetadataExtractor instance.\n     * @param { AsyncCallback<AVMetadataExtractor> } callback - Callback used to return AVMetadataExtractor instance\n     * if the operation is successful; returns null otherwise.\n     * @throws { BusinessError } 5400101 - No memory. Returned by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @since 11\n     */\n    /**\n     * Creates an **AVMetadataExtractor** instance. This API uses an asynchronous callback to return the result.\n     * @param { AsyncCallback<AVMetadataExtractor> } callback - Callback used to return the result. If the operation is\n     * successful, **err** is **undefined** and **data** is the **AVMetadataExtractor** instance created;\n     * otherwise, **err** is an error object.\n     * @throws { BusinessError } 5400101 - No memory. Returned by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @crossplatform\n     * @since 12\n     */\n    function createAVMetadataExtractor(callback: AsyncCallback<AVMetadataExtractor>): void;\n    /**\n     * Creates an **AVImageGenerator** instance. This API uses a promise to return the result.\n     * @returns { Promise<AVImageGenerator> } Promise used to return the result. If the operation is successful,\n     * an **AVImageGenerator** instance is returned; otherwise, **null** is returned.\n     * The API can be used to obtain a video thumbnail.\n     * @throws { BusinessError } 5400101 - No memory. Returned by promise.\n     * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n     * @since 12\n     */\n    function createAVImageGenerator(): Promise<AVImageGenerator>;\n    /**\n     * Creates an **AVImageGenerator** instance. This API uses an asynchronous callback to return the result.\n     * @param { AsyncCallback<AVImageGenerator> } callback - Callback used to return the result.\n     * If the operation is successful, an **AVImageGenerator** instance is returned; otherwise, **null** is returned.\n     * The API can be used to obtain a video thumbnail.\n     * @throws { BusinessError } 5400101 - No memory. Returned by callback.\n     * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n     * @since 12\n     */\n    function createAVImageGenerator(callback: AsyncCallback<AVImageGenerator>): void;\n    /**\n     * Fetch media meta data or audio art picture from source. Before calling an AVMetadataExtractor method,\n     * you must use createAVMetadataExtractor() to create an AVMetadataExtractor instance.\n     * @typedef AVMetadataExtractor\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @since 11\n     */\n    /**\n     * Fetch media meta data or audio art picture from source. Before calling an **AVMetadataExtractor** method,\n     * you must use [createAVMetadataExtractor()]{@link #createAVMetadataExtractor} to create an\n     * **AVMetadataExtractor** instance.\n     *\n     * @typedef AVMetadataExtractor\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @crossplatform\n     * @since 12\n     */\n    interface AVMetadataExtractor {\n        /**\n         * Media file descriptor.\n         * @type { ?AVFileDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Media file descriptor, which specifies the data source. Before obtaining metadata,\n         * you must set the data source through either **fdSrc** or **dataSrc**.\n         *\n         * **Example:**\n         *\n         * There is a media file that stores continuous assets, the address offset is 0, and the byte length is 100.\n         * Its file descriptor is **AVFileDescriptor { fd = resourceHandle; offset = 0; length = 100; }**.\n         *\n         * **NOTE**\n         * - After the resource handle (FD) is transferred to an **AVMetadataExtractor** instance,\n         * do not use the resource handle to perform other read and write operations, including but not limited to\n         * transferring this handle to other **AVPlayer**, **AVMetadataExtractor**, **AVImageGenerator**,\n         * or **AVTranscoder** instance. Competition occurs when multiple **AVMetadataExtractor** use the same resource\n         * handle to read and write files at the same time, resulting in errors in obtaining data.\n         * @type { ?AVFileDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        fdSrc?: AVFileDescriptor;\n        /**\n         * DataSource descriptor.\n         * @type { ?AVDataSrcDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Streaming media resource descriptor, which specifies the data source. Before obtaining metadata,\n         * you must set the data source through either **fdSrc** or **dataSrc**.\n         *\n         * When an application obtains a media file from the remote, you can set **dataSrc** to obtain the metadata before\n         * the application finishes the downloading.\n         * @type { ?AVDataSrcDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        dataSrc?: AVDataSrcDescriptor;\n        /**\n         * It will extract the resource to fetch media meta data info.\n         * @param { AsyncCallback<AVMetadata> } callback - A callback instance used to return when fetchMetadata completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Obtains media metadata. This API uses an asynchronous callback to return the result.\n         * @param { AsyncCallback<AVMetadata> } callback - Callback used to return the result,\n         * which is an **AVMetadata** instance.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        fetchMetadata(callback: AsyncCallback<AVMetadata>): void;\n        /**\n         * It will extract the resource to fetch media meta data info.\n         * @returns { Promise<AVMetadata> } A Promise instance used to return when fetchMetadata completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Obtains media metadata. This API uses a promise to return the result.\n         * @returns { Promise<AVMetadata> } Promise used to return the result, which is an **AVMetadata** instance.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        fetchMetadata(): Promise<AVMetadata>;\n        /**\n         * It will extract the audio resource to fetch an album cover.\n         * @param { AsyncCallback<image.PixelMap> } callback - A callback instance used\n         * to return when fetchAlbumCover completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Obtains the cover of the audio album. This API uses an asynchronous callback to return the result.\n         * @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the album cover.\n         * to return when fetchAlbumCover completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        fetchAlbumCover(callback: AsyncCallback<image.PixelMap>): void;\n        /**\n         * It will extract the audio resource to fetch an album cover.\n         * @returns { Promise<image.PixelMap> } A Promise instance used to return when fetchAlbumCover completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Obtains the cover of the audio album. This API uses a promise to return the result.\n         * @returns { Promise<image.PixelMap> } Promise used to return the album cover.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        fetchAlbumCover(): Promise<image.PixelMap>;\n        /**\n         * Sets the network media source URL and configures request headers.\n         * @param { string } url - The URL of the media resource.\n         * @param { Record<string, string> } headers - Optional request headers.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 20\n         */\n        setUrlSource(url: string, headers?: Record<string, string>): void;\n        /**\n         * It will decode the given video resource. Then fetch a picture\n         * at @timeUs according the given @options and @param .\n         * @param { number } timeUs - The time expected to fetch picture from the video resource.\n         * The unit is microsecond(us).\n         * @param { AVImageQueryOptions } options - The time options about the relationship\n         * between the given timeUs and a key frame, see @AVImageQueryOptions .\n         * @param { PixelMapParams } param - The output pixel map format params, see @PixelMapParams .\n         * @returns { Promise<image.PixelMap> } A Promise instance used to return the pixel map\n         * when fetchFrameByTime completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise.\n         * @throws { BusinessError } 5400108 - Parameter check failed. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 20\n         */\n        fetchFrameByTime(timeUs: number, options: AVImageQueryOptions, param: PixelMapParams): Promise<image.PixelMap>;\n        /**\n         * Release resources used for AVMetadataExtractor.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when release completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Releases this **AVMetadataExtractor** instance. This API uses an asynchronous callback to return the result.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        release(callback: AsyncCallback<void>): void;\n        /**\n         * Release resources used for AVMetadataExtractor.\n         * @returns { Promise<void> } A Promise instance used to return when release completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Releases this **AVMetadataExtractor** instance. This API uses a promise to return the result.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        release(): Promise<void>;\n    }\n    /**\n     * Provides the container definition for media meta data.\n     * @typedef AVMetadata\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @since 11\n     */\n    /**\n     * Defines the audio and video metadata. Parameters that are not declared as read-only in\n     * [AVRecorderConfig]{@link #AVRecorderConfig} can be used as input parameters for recording of\n     * [AVRecorder]{@link #AVRecorder}.\n     * @typedef AVMetadata\n     * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n     * @crossplatform\n     * @since 12\n     */\n    interface AVMetadata {\n        /**\n         * The metadata to retrieve the information about the album title\n         * of the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Title of the album. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        album?: string;\n        /**\n         * The metadata to retrieve the information about the performer or\n         * artist associated with the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Artist of the album. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        albumArtist?: string;\n        /**\n         * The metadata to retrieve the information about the artist of\n         * the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Artist of the media asset. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        artist?: string;\n        /**\n         * The metadata to retrieve the information about the author of\n         * the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Author of the media asset. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        author?: string;\n        /**\n         * The metadata to retrieve the information about the created time of\n         * the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Time when the media asset is created. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        dateTime?: string;\n        /**\n         * The metadata to retrieve the information about the created or modified time\n         * with the specific date format of the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Time when the media asset is created. The value is in the YYYY-MM-DD HH:mm:ss format.\n         * This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        dateTimeFormat?: string;\n        /**\n         * The metadata to retrieve the information about the composer of\n         * the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Composer of the media asset. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        composer?: string;\n        /**\n         * The metadata to retrieve the playback duration of the media source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Duration of the media asset. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        duration?: string;\n        /**\n         * The metadata to retrieve the content type or genre of the data\n         * source.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Type or genre of the media asset.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        genre?: string;\n        /**\n         * If this value exists the media contains audio content.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Whether the media asset contains audio. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        hasAudio?: string;\n        /**\n         * If this value exists the media contains video content.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Whether the media asset contains a video. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        hasVideo?: string;\n        /**\n         * The metadata to retrieve the mime type of the media source. Some\n         * example mime types include: \"video/mp4\", \"audio/mp4\", \"audio/amr-wb\",\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * MIME type of the media asset. This parameter is read-only in the current version.\n         * Some example mime types include: \"video/mp4\", \"audio/mp4\", \"audio/amr-wb\".\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        mimeType?: string;\n        /**\n         * The metadata to retrieve the number of tracks, such as audio, video,\n         * text, in the media source, such as a mp4 or 3gpp file.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Number of tracks of the media asset. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        trackCount?: string;\n        /**\n         * It is the audio sample rate, if available.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Audio sampling rate, in Hz. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        sampleRate?: string;\n        /**\n         * The metadata to retrieve the media source title.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Title of the media asset. This parameter is read-only in the current version.\n         * This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        title?: string;\n        /**\n         * If the media contains video, this key retrieves its height.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Video height, in px. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        videoHeight?: string;\n        /**\n         * If the media contains video, this key retrieves its width.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Video width, in px. This parameter is read-only in the current version.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        videoWidth?: string;\n        /**\n         * The metadata to retrieve the information about the video\n         * orientation.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 11\n         */\n        /**\n         * Video rotation direction, in degrees.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @crossplatform\n         * @since 12\n         */\n        videoOrientation?: string;\n        /**\n        * HDR type of the media asset. This parameter is read-only in the current version.\n        * @type { ?HdrType }\n        * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n        * @crossplatform\n        * @since 12\n        */\n        hdrType?: HdrType;\n        /**\n         * Geographical location of the media asset.\n         * @type { ?Location }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 12\n         */\n        location?: Location;\n        /**\n         * Custom key-value mappings obtained from **moov.meta.list**.\n         * @type { ?Record<string, string> }\n         * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor\n         * @since 12\n         */\n        customInfo?: Record<string, string>;\n    }\n    /**\n     * This interface is used to define the output image size.\n     * @typedef OutputSize\n     * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n     * @since 20\n     */\n    declare interface OutputSize {\n        /**\n         * The expected output frame image width.\n         * If the value is less then 0， the width will be  the orginal width of the vido.\n         * If the value is 0 or no value is assigned, the scaling ratio will follow the specified height.\n         * If both width and height is not assigned, the output will be the original size of video frame.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 20\n         */\n        width?: number;\n        /**\n         * The expected output frame image height.\n         * If the value is less then 0， the height will be  the orginal height of the vido.\n         * If the value is 0 or no value is assigned, the scaling ratio will follow the specified width.\n         * If both width and height is not assigned, the output will be the original size of video frame.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 20\n         */\n        height?: number;\n    }\n    /**\n     * Enumerates options about the HDR Type of the video.\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @since 12\n     */\n    enum HdrType {\n        /**\n         * This option is used to mark none HDR type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        AV_HDR_TYPE_NONE = 0,\n        /**\n         * This option is used to mark HDR Vivid type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        AV_HDR_TYPE_VIVID = 1\n    }\n    /**\n     * Provides APIs to obtain a thumbnail from a video. Before calling any API of **AVImageGenerator**,\n     * you must use [createAVImageGenerator()]{@link #createAVImageGenerator} to create an **AVImageGenerator** instance.\n     *\n     * @typedef AVImageGenerator\n     * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n     * @since 12\n     */\n    interface AVImageGenerator {\n        /**\n         * Media file descriptor, which specifies the data source.\n         *\n         * **Example:**\n         *\n         * There is a media file that stores continuous assets, the address offset is 0, and the byte length is 100.\n         * Its file descriptor is **AVFileDescriptor { fd = resourceHandle; offset = 0; length = 100; }**.\n         *\n         * **NOTE**\n         * - After the resource handle (FD) is transferred to an **AVImageGenerator** instance,\n         * do not use the resource handle to perform other read and write operations, including but not limited to\n         * transferring this handle to other **AVPlayer**, **AVMetadataExtractor**, **AVImageGenerator**,\n         * or **AVTranscoder** instance. Competition occurs when multiple **AVImageGenerator**\n         * use the same resource handle to read and write files at the same time, resulting in errors in obtaining data.\n         * @type { ?AVFileDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        fdSrc?: AVFileDescriptor;\n        /**\n         * Obtains a video thumbnail. This API uses an asynchronous callback to return the result.\n         * @param { number } timeUs - Time of the video for which a thumbnail is to be obtained, in μs.\n         * @param { AVImageQueryOptions } options - Relationship between the time passed in and the video frame.\n         * @param { PixelMapParams } param - Format parameters of the thumbnail to be obtained.\n         * @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the result. If the operation is\n         * successful, **err** is **undefined** and **data** is the **PixelMap** instance obtained; otherwise,\n         * **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        fetchFrameByTime(timeUs: number, options: AVImageQueryOptions, param: PixelMapParams, callback: AsyncCallback<image.PixelMap>): void;\n        /**\n         * Obtains a video thumbnail. This API uses a promise to return the result.\n         * @param { number } timeUs - Time of the video for which a thumbnail is to be obtained, in μs.\n         * @param { AVImageQueryOptions } options - Relationship between the time passed in and the video frame.\n         * @param { PixelMapParams } param - Format parameters of the thumbnail to be obtained.\n         * @returns { Promise<image.PixelMap> } Promise used to return the video thumbnail.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        fetchFrameByTime(timeUs: number, options: AVImageQueryOptions, param: PixelMapParams): Promise<image.PixelMap>;\n        /**\n         * Supports extracting video thumbnails by proportional scaling\n         * @param { number } timeUs - The time expected to fetch picture from the video resource.\n         * The unit is microsecond(us).\n         * @param { AVImageQueryOptions } queryMode - Specify how to position the video frame\n         * @param { OutputSize } outputSize - This field is used to define the output size of frame.\n         * @returns { Promise<image.PixelMap> }  Returns the output image object\n         * @throws { BusinessError  } 5400102 Operation not allowed. Returned by promise.\n         * @throws { BusinessError  } 5400106 Unsupported format. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 20\n         */\n        fetchScaledFrameByTime(timeUs: number, queryMode: AVImageQueryOptions, outputSize?: OutputSize): Promise<image.PixelMap>;\n        /**\n         * Releases this **AVImageGenerator** instance. This API uses an asynchronous callback to return the result.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        release(callback: AsyncCallback<void>): void;\n        /**\n         * Releases this **AVImageGenerator** instance. This API uses a promise to return the result.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        release(): Promise<void>;\n    }\n    /**\n     * Enumerates the relationship between the video frame and the time at which the video thumbnail is obtained.\n     *\n     * The time passed in for obtaining the thumbnail may be different from the time of the video frame for which\n     * the thumbnail is actually obtained. Therefore, you need to specify their relationship.\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n     * @since 12\n     */\n    enum AVImageQueryOptions {\n        /**\n         * The key frame at or next to the specified time is selected.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        AV_IMAGE_QUERY_NEXT_SYNC,\n        /**\n         * The key frame at or prior to the specified time is selected.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        AV_IMAGE_QUERY_PREVIOUS_SYNC,\n        /**\n         * The key frame closest to the specified time is selected.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        AV_IMAGE_QUERY_CLOSEST_SYNC,\n        /**\n         * The frame (not necessarily a key frame) closest to the specified time is selected.\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        AV_IMAGE_QUERY_CLOSEST\n    }\n    /**\n     * Defines the format parameters of the video thumbnail to be obtained.\n     * @typedef PixelMapParams\n     * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n     * @since 12\n     */\n    interface PixelMapParams {\n        /**\n         * Width of the thumbnail. The value must be greater than 0 and less than or equal to the width of the original\n         * video. Otherwise, the returned thumbnail will not be scaled.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        width?: number;\n        /**\n         * Height of the thumbnail. The value must be greater than 0 and less than or equal to the height of the original\n         * video. Otherwise, the returned thumbnail will not be scaled.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVImageGenerator\n         * @since 12\n         */\n        height?: number;\n    }\n    /**\n      * Enumerates ErrorCode types, return in BusinessError::code.\n      *\n      * @enum { number }\n      * @syscap SystemCapability.Multimedia.Media.Core\n      * @since 9\n      */\n    /**\n     * Enumerates ErrorCode types, return in BusinessError::code.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Enumerates the media error codes, return in BusinessError::code.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum AVErrorCode {\n        /**\n         * Operation success.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * Operation success.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Operation success.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_OK = 0,\n        /**\n         * Permission denied.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * Permission denied.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Permission denied.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_NO_PERMISSION = 201,\n        /**\n         * Invalid parameter.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * Invalid parameter.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Invalid parameter.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_INVALID_PARAMETER = 401,\n        /**\n         * The api is not supported in the current version.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * The api is not supported in the current version.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * The api is not supported in the current version.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_UNSUPPORT_CAPABILITY = 801,\n        /**\n         * The system memory is insufficient or the number of services reaches the upper limit.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * The system memory is insufficient or the number of services reaches the upper limit.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * The system memory is insufficient or the number of services reaches the upper limit.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_NO_MEMORY = 5400101,\n        /**\n         * Current status does not allow or do not have permission to perform this operation.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * Current status does not allow or do not have permission to perform this operation.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Current status does not allow or do not have permission to perform this operation.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_OPERATE_NOT_PERMIT = 5400102,\n        /**\n         * Data flow exception information.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * Data flow exception information.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Data flow exception information.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_IO = 5400103,\n        /**\n         * System or network response timeout.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * System or network response timeout.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * System or network response timeout.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_TIMEOUT = 5400104,\n        /**\n         * Service process died.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * Service process died.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Service process died.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_SERVICE_DIED = 5400105,\n        /**\n         * Unsupported media format.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * Unsupported media format.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Unsupported media format.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_UNSUPPORT_FORMAT = 5400106,\n        /**\n         * Audio interrupted.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Audio interrupted.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AVERR_AUDIO_INTERRUPTED = 5400107,\n        /**\n         * The address of server is incorrect, and IO can not find host.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_HOST_NOT_FOUND = 5411001,\n        /**\n         * Network connection timeout.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_CONNECTION_TIMEOUT = 5411002,\n        /**\n         * Failed link due to abnormal network.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_NETWORK_ABNORMAL = 5411003,\n        /**\n         * Failed link due to unavailable network.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_NETWORK_UNAVAILABLE = 5411004,\n        /**\n         * Network permission dennied.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_NO_PERMISSION = 5411005,\n        /**\n         * The client request parameters are incorrect or exceed the processing capacity.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_REQUEST_DENIED = 5411006,\n        /**\n         * Cannot find available network resources.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_RESOURCE_NOT_FOUND = 5411007,\n        /**\n         * The server failS to verify the client certificate because the certificate is not carried,\n         * the certificate is invalid, or the certificate is expired.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_SSL_CLIENT_CERT_NEEDED = 5411008,\n        /**\n         * The client fails to verify the server certificate because the certificate is not carried,\n         * the certificate is invalid, or the certificate is expired.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_SSL_CONNECTION_FAILED = 5411009,\n        /**\n         * IO SSL server cert untrusted.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_SSL_SERVER_CERT_UNTRUSTED = 5411010,\n        /**\n         * Unsupported request due to network protocols.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        AVERR_IO_UNSUPPORTED_REQUEST = 5411011,\n        /**\n         * Seek continuous unsupported.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        AVERR_SEEK_CONTINUOUS_UNSUPPORTED = 5410002,\n        /**\n         * Super-resolution unsupported.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        AVERR_SUPER_RESOLUTION_UNSUPPORTED = 5410003,\n        /**\n         * No PlaybackStrategy set to enable super-resolution feature.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        AVERR_SUPER_RESOLUTION_NOT_ENABLED = 5410004\n    }\n    /**\n     * Describes AVPlayer states.\n     * @typedef {'idle' | 'initialized' | 'prepared' | 'playing' | 'paused' | 'completed' | 'stopped' | 'released' | 'error'}\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @since 9\n  \n     */\n    /**\n     * Describes AVPlayer states.\n     * @typedef {'idle' | 'initialized' | 'prepared' | 'playing' | 'paused' | 'completed' | 'stopped' | 'released' | 'error'}\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 11\n  \n     */\n    /**\n     * Enumerates the states of the AVPlayer. Your application can proactively obtain the AVPlayer state through the\n     * **state** attribute or obtain the reported AVPlayer state by subscribing to the\n     * [stateChange]{@link #stateChange} event.\n     * @typedef {'idle' | 'initialized' | 'prepared' | 'playing' | 'paused' | 'completed' | 'stopped' | 'released' | 'error'}\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type AVPlayerState = 'idle' | 'initialized' | 'prepared' | 'playing' | 'paused' | 'completed' | 'stopped' | 'released' | 'error';\n    /**\n     * Describes the callback invoked for the track change event.\n     * @typedef { function } OnTrackChangeHandler\n     * @param { number } index - index number for change Track.\n     * @param { boolean } isSelected - Status of the track, that is, whether the track is selected.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 12\n     */\n    type OnTrackChangeHandler = (index: number, isSelected: boolean) => void;\n    /**\n     * Describes the callback invoked for the AVPlayer state change event.\n     *\n     * @typedef { function } OnAVPlayerStateChangeHandle\n     * @param { AVPlayerState } state - state for AVPlayer.\n     * @param { StateChangeReason } reason - reason for state change.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type OnAVPlayerStateChangeHandle = (state: AVPlayerState, reason: StateChangeReason) => void;\n    /**\n     * Describes the callback invoked for the buffering update event.\n     *\n     * @typedef { function } OnBufferingUpdateHandler\n     * @param { BufferingInfoType } infoType - define the Buffering info Type.\n     * @param { number } value - define the value of buffering info type if exist.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type OnBufferingUpdateHandler = (infoType: BufferingInfoType, value: number) => void;\n    /**\n     * Describes the callback invoked for the video size change event.\n     *\n     * @typedef { function } OnVideoSizeChangeHandler\n     * @param { number } width - Value of video Width.\n     * @param { number } height - Value of video Height.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type OnVideoSizeChangeHandler = (width: number, height: number) => void;\n    /**\n     * Describes the callback used to listen for video super resolution status changes. If super resolution is enabled by\n     * using PlaybackStrategy, this callback is invoked to report the super resolution status changes. It is also invoked\n     * to report the initial status when the video starts. However, this callback is not invoked when super resolution is\n     * not enabled.\n     *\n     * Super resolution is automatically disabled in either of the following cases:\n     *\n     * 1.The current super resolution algorithm only works with videos that have a frame rate of 30 fps or lower. If the\n     * video frame rate exceeds 30 fps, or if the input frame rate exceeds the processing capability of the super\n     * resolution algorithm in scenarios such as fast playback, super resolution is automatically disabled.\n     *\n     * 2.The current super resolution algorithm supports input resolutions from 320 x 320 to 1920 x 1080, in px. If the\n     * input video resolution exceeds the range during playback, super resolution is automatically disabled.\n     *\n     * @typedef { function } OnSuperResolutionChanged\n     * @param { boolean } enabled - Whether super resolution is enabled. The value **true** means that it is enabled,\n     * and **false** means the opposite.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 18\n     */\n    type OnSuperResolutionChanged = (enabled: boolean) => void;\n    /**\n     * Describes the information of an SEI message.\n     *\n     * @typedef SeiMessage\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 18\n     */\n    interface SeiMessage {\n        /**\n         * Payload type of SEI message.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        payloadType: number;\n        /**\n         * Payload data of SEI message.\n         * @type { ArrayBuffer }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        payload: ArrayBuffer;\n    }\n    /**\n     * Describes the handle used to obtain SEI messages. This is used when in subscriptions to SEI message events,\n     * and the callback returns detailed SEI information.\n     *\n     * @typedef { function } OnSeiMessageHandle\n     * @param { Array<SeiMessage> } messages - SEI messages.\n     * @param { ?number } playbackPosition - playback position.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 18\n     */\n    type OnSeiMessageHandle = (messages: Array<SeiMessage>, playbackPosition?: number) => void;\n    /**\n     * Defines the OnPlaybackRateDone callback.\n     *\n     * @typedef { function } OnPlaybackRateDone\n     * @param { number } rate - playback rate.\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 20\n     */\n    type OnPlaybackRateDone = (rate: number) => void;\n    /**\n     * Manages and plays media. Before calling an AVPlayer method, you must use createAVPlayer()\n     * to create an AVPlayer instance.\n     *\n     * @typedef AVPlayer\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @since 9\n     */\n    /**\n     * Manages and plays media. Before calling an AVPlayer method, you must use createAVPlayer()\n     * to create an AVPlayer instance.\n     *\n     * @typedef AVPlayer\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Manages and plays media. Before calling an AVPlayer method, you must use createAVPlayer()\n     * to create an **AVPlayer** instance.\n     * <br>For details about the audio and video playback demo, see Audio Playback and Video Playback.\n     * <br>**NOTE:**<br>\n     * When using the **AVPlayer** instance, you are advised to register the following callbacks to proactively\n     * obtain status changes:\n     *\n     * on('stateChange'): listens for AVPlayer state changes.\n     *\n     * on('error'): listens for error events.\n     *\n     * @typedef AVPlayer\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    interface AVPlayer {\n        /**\n         * Prepare audio/video playback, it will request resource for playing. This API can be called\n         * only when the AVPlayer is in the initialized state.\n         * @param { AsyncCallback<void> } callback used to return the result when prepare completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Prepare audio/video playback, it will request resource for playing. This API can be called\n         * only when the AVPlayer is in the initialized state.\n         * @param { AsyncCallback<void> } callback used to return the result when prepare completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Prepare audio/video playback, it will request resource for playing. This API can be called only\n         * when the AVPlayer is in the initialized state.\n         *\n         * <p>If your application frequently switches between short videos, you can create multiple AVPlayer\n         * objects to prepare the next video in advance, thereby improving the switching performance.\n         * For details, see [Smooth Switchover Between Online Short Videos]{@link\n         * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-smooth-switching}.</p>\n         *\n         * @param { AsyncCallback<void> } callback used to return the result when prepare completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @throws { BusinessError } 5400106 - Unsupported format. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        prepare(callback: AsyncCallback<void>): void;\n        /**\n         * Prepare audio/video playback, it will request resource for playing. This API can be called\n         * only when the AVPlayer is in the initialized state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Prepare audio/video playback, it will request resource for playing. This API can be called\n         * only when the AVPlayer is in the initialized state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Prepare audio/video playback, it will request resource for playing. This API can be called\n         * only when the AVPlayer is in the initialized state.\n         *\n         * <p>If your application frequently switches between short videos, you can create multiple AVPlayer\n         * objects to prepare the next video in advance, thereby improving the switching performance.\n         * For details, see [Smooth Switchover Between Online Short Videos]{@link\n         * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-smooth-switching}.</p>\n         *\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        prepare(): Promise<void>;\n        /**\n         * Play audio/video playback. This API can be called only when the AVPlayer is in the prepared, paused or completed state.\n         * @param { AsyncCallback<void> } callback used to return the result when play completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Play audio/video playback. This API can be called only when the AVPlayer is in the prepared, paused or completed state.\n         * @param { AsyncCallback<void> } callback used to return the result when play completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Play audio/video playback. This API can be called only when the AVPlayer is in the prepared, paused or completed state.\n         * @param { AsyncCallback<void> } callback used to return the result when play completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        play(callback: AsyncCallback<void>): void;\n        /**\n         * Play audio/video playback. This API can be called only when the AVPlayer is in the prepared, paused or completed state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Play audio/video playback. This API can be called only when the AVplayer is in the prepared, paused or completed state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Play audio/video playback. This API can be called only when the AVPlayer is in the prepared, paused or completed state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        play(): Promise<void>;\n        /**\n         * Pause audio/video playback. This API can be called only when the AVPlayer is in the playing state.\n         * @param { AsyncCallback<void> } callback used to return the result when pause completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Pause audio/video playback. This API can be called only when the AVPlayer is in the playing state.\n         * @param { AsyncCallback<void> } callback used to return the result when pause completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Pause audio/video playback. This API can be called only when the AVPlayer is in the playing state.\n         * @param { AsyncCallback<void> } callback used to return the result when pause completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        pause(callback: AsyncCallback<void>): void;\n        /**\n         * Pause audio/video playback. This API can be called only when the AVPlayer is in the playing state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Pause audio/video playback. This API can be called only when the AVPlayer is in the playing state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Pause audio/video playback. This API can be called only when the AVPlayer is in the playing state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        pause(): Promise<void>;\n        /**\n         * Stop audio/video playback. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused or completed state.\n         * @param { AsyncCallback<void> } callback used to return the result when stop completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Stop audio/video playback. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused or completed state.\n         * @param { AsyncCallback<void> } callback used to return the result when stop completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Stop audio/video playback. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused or completed state.\n         * @param { AsyncCallback<void> } callback used to return the result when stop completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        stop(callback: AsyncCallback<void>): void;\n        /**\n         * Stop audio/video playback. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused or completed state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Stop audio/video playback. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused or completed state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Stop audio/video playback. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused or completed state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        stop(): Promise<void>;\n        /**\n         * Reset AVPlayer, it will be set to idle state and can set src again. This API can be called only when\n         * the AVPlayer is in the initialized, prepared, playing, paused, completed, stopped or error state.\n         * @param { AsyncCallback<void> } callback used to return the result when reset completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Reset AVPlayer, it will be set to idle state and can set src again. This API can be called only when\n         * the AVPlayer is in the initialized, prepared, playing, paused, completed, stopped or error state.\n         * @param { AsyncCallback<void> } callback used to return the result when reset completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Reset AVPlayer, it will be set to idle state and can set src again. This API can be called only when\n         * the AVPlayer is in the initialized, prepared, playing, paused, completed, stopped or error state.\n         * @param { AsyncCallback<void> } callback used to return the result when reset completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        reset(callback: AsyncCallback<void>): void;\n        /**\n         * Reset AVPlayer, it will be set to idle state and can set src again. This API can be called only when\n         * the AVPlayer is in the initialized, prepared, playing, paused, completed, stopped or error state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Reset AVPlayer, it will be set to idle state and can set src again. This API can be called only when\n         * the AVPlayer is in the initialized, prepared, playing, paused, completed, stopped or error state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Reset AVPlayer, it will be set to idle state and can set src again. This API can be called only when\n         * the AVPlayer is in the initialized, prepared, playing, paused, completed, stopped or error state.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        reset(): Promise<void>;\n        /**\n         * Releases resources used for AVPlayer. This API can be called when the AVPlayer is in any state except released.\n         * @param { AsyncCallback<void> } callback used to return the result when release completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Releases resources used for AVPlayer. This API can be called when the AVPlayer is in any state except released.\n         * @param { AsyncCallback<void> } callback used to return the result when release completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Releases resources used for AVPlayer. This API can be called when the AVPlayer is in any state except released.\n         * @param { AsyncCallback<void> } callback used to return the result when release completed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        release(callback: AsyncCallback<void>): void;\n        /**\n         * Releases resources used for AVPlayer. This API can be called when the AVPlayer is in any state except released.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Releases resources used for AVPlayer. This API can be called when the AVPlayer is in any state except released.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Releases resources used for AVPlayer. This API can be called when the AVPlayer is in any state except released.\n         * @returns { Promise<void> } A Promise instance used to return the operation result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        release(): Promise<void>;\n        /**\n         * Jumps to the specified playback position. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused, or completed state.\n         * @param { number } timeMs - Playback position to jump, should be in [0, duration].\n         * @param { SeekMode } mode - See @SeekMode .\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Jumps to the specified playback position. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused, or completed state.\n         * @param { number } timeMs - Playback position to jump, should be in [0, duration].\n         * @param { SeekMode } mode - See @SeekMode .\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Jumps to the specified playback position. This API can be called only when the AVPlayer is in the prepared,\n         * playing, paused, or completed state.\n         * You can check whether the seek operation takes effect by subscribing to the [seekDone]{@link #seekDone} event.\n         * This API is not supported in live mode.\n         * @param { number } timeMs - Playback position to jump, should be in [0, duration]. In SEEK_CONTINUOU mode,\n         * the value -1 can be used to indicate the end of SEEK_CONTINUOUS mode.\n         * @param { SeekMode } mode - See @SeekMode . The default value is **SEEK_PREV_SYNC**.\n         * Set this parameter only for video playback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        seek(timeMs: number, mode?: SeekMode): void;\n        /**\n         * Sets the volume.\n         * @param { number } volume - Relative volume. The value ranges from 0.00 to 1.00. The value 1 indicates the maximum volume (100%).\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Sets the volume. This API can be called only when the AVPlayer is in the prepared, playing,\n         * paused, or completed state.\n         * You can check whether the setting takes effect by subscribing to the volumeChange event.\n         * @param { number } volume - Relative volume. The value ranges from 0.00 to 1.00.\n         * The value **1.00** indicates the maximum volume (100%).\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        setVolume(volume: number): void;\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @param { AsyncCallback<Array<MediaDescription>> } callback - Async callback return track info in MediaDescription.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @param { AsyncCallback<Array<MediaDescription>> } callback - Async callback return track info in MediaDescription.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Obtains the audio and video track information. This API can be called only when the AVPlayer is in the prepared,\n         * playing, or paused state. To obtain information about all audio and video tracks, this API must be called after\n         * the data loading callback is triggered. This API uses an asynchronous callback to return the result.\n         * @param { AsyncCallback<Array<MediaDescription>> } callback - Async callback return track info in MediaDescription.\n         * If the operation is successful, err is undefined and data is the MediaDescription array obtained;\n         * otherwise, err is an error object.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        getTrackDescription(callback: AsyncCallback<Array<MediaDescription>>): void;\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @returns { Promise<Array<MediaDescription>> } A Promise instance used to return the track info in MediaDescription.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @returns { Promise<Array<MediaDescription>> } A Promise instance used to return the track info in MediaDescription.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Obtains the audio and video track information. This API can be called only when the AVPlayer is in the prepared,\n         * playing, or paused state. This API uses a promise to return the result.\n         * @returns { Promise<Array<MediaDescription>> } A Promise instance used to return the track info in MediaDescription.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        getTrackDescription(): Promise<Array<MediaDescription>>;\n        /**\n         * Obtains the indexes of the selected audio or video tracks. This API can be called only when the AVPlayer\n         * is in the prepared, playing, or paused state. This API uses a promise to return the result.\n         * @returns { Promise<Array<number>> } A Promise instance used to return selected track index.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        getSelectedTracks(): Promise<Array<number>>;\n        /**\n         * Selects a track when the AVPlayer is used to play a resource with multiple audio and video tracks.\n         * This API uses a promise to return the result.\n         * @param { number } index - Track index returned by getTrackDescription#MD_KEY_TRACK_INDEX\n         * @param { SwitchMode } mode - set switchmode for track select behavior. The default mode is SMOOTH.\n         * This parameter takes effect only for the switch of a video track for DASH streams.\n         * @returns { Promise<void> } A Promise instance used to return when select track completed.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        selectTrack(index: number, mode?: SwitchMode): Promise<void>;\n        /**\n         * Deselects a track when the AVPlayer is used to play a resource with multiple audio and video tracks.\n         * This API uses a promise to return the result.\n         * @param { number } index : Track index returned by getTrackDescription#MD_KEY_TRACK_INDEX\n         * @returns { Promise<void> } A Promise instance used to return when deselect track completed.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        deselectTrack(index: number): Promise<void>;\n        /**\n         * Sets a source of streaming media that can be pre-downloaded, downloads the media data, and temporarily stores\n         * the data in the memory. For details about how to use the API, see Video Playback This API uses a promise to\n         * return the result.\n         * @param { MediaSource } src : Source of the streaming media to pre-download.\n         * @param { PlaybackStrategy } strategy : strategy for playing the pre-downloaded streaming media.\n         * @returns { Promise<void> } A Promise instance used to return when setMediaSource completed.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        setMediaSource(src: MediaSource, strategy?: PlaybackStrategy): Promise<void>;\n        /**\n         * Add subtitle resource represented by FD to the player. Currently, the external subtitle must be set after\n         * fdSrc of the video resource is set in an AVPlayer instance. This API uses a promise to return the result.\n         * @param { number } fd : The file descriptor of subtitle source from file system, which is obtained by\n         * calling resourceManager.getRawFd.\n         * The caller is responsible to close the file descriptor.\n         * @param { number } offset : The offset into the file where the data to be read, in bytes.\n         * By default, the offset is zero.\n         * @param { number } length : The length in bytes of the data to be read.\n         * By default, the length is the rest of bytes in the file from the offset.\n         * @returns { Promise<void> } Promise used to return the result.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        addSubtitleFromFd(fd: number, offset?: number, length?: number): Promise<void>;\n        /**\n         * Add subtitle resource represented by url to the player. Currently, the external subtitle must be set\n         * after fdSrc of the video resource is set in an AVPlayer instance. After the Promise returns,\n         * subtitle info can be obtained by @getTrackDescription\n         * @param { string } url : Address of external subtitle file.\n         * @returns { Promise<void> } Promise used to return the result.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        addSubtitleFromUrl(url: string): Promise<void>;\n        /**\n         * Get statistic infos of current player. This API can be called only when the AVPlayer is in the prepared,\n         * playing, or paused state.\n         * @returns { Promise<PlaybackInfo> } Statistic infos of current player.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 12\n         */\n        getPlaybackInfo(): Promise<PlaybackInfo>;\n        /**\n         * Set playback strategy to AVPlayer. This API can be called only when the AVPlayer is in the initialized state.\n         * @param { PlaybackStrategy } strategy : specified strategy of the AVPlayer.\n         * @returns { Promise<void> }  A Promise instance used to return when setPlaybackStrategy completed.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        setPlaybackStrategy(strategy: PlaybackStrategy): Promise<void>;\n        /**\n         * Mute specified media stream. This API can be called only when the AVPlayer is in the prepared, playing,\n         * paused, or completed state.\n         * @param { MediaType } mediaType - specified media Type, see [MediaType]{@link #MediaType}.\n         * The parameter can be set only to the audio format.\n         * @param { boolean } muted - true for mute, false for unmute.\n         * @returns { Promise<void> } A Promise instance used to return when setMediaMuted completed.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        setMediaMuted(mediaType: MediaType, muted: boolean): Promise<void>;\n        /**\n         * Set playback start position and end position. After the setting, only the content in the specified range of\n         * the audio or video file is played. This API uses a promise to return the result. It can be used in the\n         * initialized, prepared, paused, stopped, or completed state.\n         * @param { number } startTimeMs - Playback start position, should be in [0, duration),\n         *                                 -1 means that the start position is not set,\n         *                                 and the playback will start from 0.\n         * @param { number } endTimeMs - Playback end position, which should usually be in (startTimeMs, duration],\n         *                               -1 means that the end position is not set,\n         *                               and the playback will be ended at the end of the stream.\n         * @param { SeekMode } [mode] - Use the specified seek mode to jump to the playback start position,\n         *                             currently support SeekMode.SEEK_PREV_SYNC and SeekMode.SEEK_CLOSEST,\n         *                             other values are invalid, the default value is SeekMode.SEEK_PREV_SYNC.\n         * @returns { Promise<void> } Promise used to return the result.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        setPlaybackRange(startTimeMs: number, endTimeMs: number, mode?: SeekMode): Promise<void>;\n        /**\n         * Checks whether the media source supports seek in SEEK_CONTINUOUS mode ([SeekMode]{@link #SeekMode}).\n         * The actual value is returned when this API is called in the prepared, playing, paused, or completed state.\n         * The value **false** is returned if it is called in other states. For devices that do not support the seek\n         * operation in SEEK_CONTINUOUS mode, false is returned.\n         * Should be called after {@link #prepare}.\n         * @returns { boolean } true: seek continuous is supported;\n         * false: seek continuous is not supported or the support status is uncertain.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        isSeekContinuousSupported(): boolean;\n        /**\n         * Get current playback position. This API can be used in the prepared, playing, paused, or completed state.\n         * @returns { number } return the time of current playback position - millisecond(ms)\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        getPlaybackPosition(): number;\n        /**\n         * Enable or disable super-resolution dynamically. This API can be called when the AVPlayer is in the\n         * initialized, prepared, playing, paused, completed, or stopped state.\n         * Must enable super-resolution feature in {@link PlaybackStrategy} before calling {@link #prepare}.\n         * See {@link #setPlaybackStrategy}, {@link #setMediaSource}.\n         * @param { boolean } enabled - true: super-resolution enabled; false: super-resolution disabled.\n         * @returns { Promise<void> } Promise used to return the result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5410003 - Super-resolution not supported. Return by promise.\n         * @throws { BusinessError } 5410004 - Missing enable super-resolution feature in {@link PlaybackStrategy}.\n         *                                     Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        setSuperResolution(enabled: boolean): Promise<void>;\n        /**\n         * Set video window size for super-resolution. This API can be called when the AVPlayer is in the initialized,\n         * prepared, playing, paused, completed, or stopped state. The input parameter values s must be in the range\n         * of 320 x 320 to 1920 x 1080 (in px).\n         *\n         * Must enable super-resolution feature in {@link PlaybackStrategy} before calling {@link #prepare}.\n         * See {@link #setPlaybackStrategy}, {@link #setMediaSource}.\n         * @param { number } width - width of the window. The value range is [320-1920], in px.\n         * @param { number } height - height of the window. The value range is [320-1080], in px.\n         * @returns { Promise<void> } Promise used to return the result.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 401 - Parameter error. Return by promise.\n         * @throws { BusinessError } 5410003 - Super-resolution not supported. Return by promise.\n         * @throws { BusinessError } 5410004 - Missing enable super-resolution feature in {@link PlaybackStrategy}.\n         *                                     Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        setVideoWindowSize(width: number, height: number): Promise<void>;\n        /**\n         * Media URI. Mainstream media formats are supported.\n         * Network:http://xxx\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Media URI. Mainstream media formats are supported.\n         * Network:http://xxx\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Media URI. It can be set only when the AVPlayer is in the idle state.\n         * The video formats MP4, MPEG-TS, and MKV are supported.\n         * The audio formats M4A, AAC, MP3, OGG, WAV, FLAC, and AMR are supported.\n         * Network:http://xxx\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        url?: string;\n        /**\n         * Media file descriptor. Mainstream media formats are supported.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Media file descriptor. Mainstream media formats are supported.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Media file descriptor. It can be set only when the AVPlayer is in the idle state.\n         * This attribute is required when media assets of an application are continuously stored in a file.\n         * The video formats MP4, MPEG-TS, and MKV are supported.\n         * The audio formats M4A, AAC, MP3, OGG, WAV, FLAC, and AMR are supported.\n         * @type { ?AVFileDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        fdSrc?: AVFileDescriptor;\n        /**\n         * DataSource descriptor. Supports mainstream media formats.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 10\n         */\n        /**\n         * DataSource descriptor. Supports mainstream media formats.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * DataSource descriptor. It can be set only when the AVPlayer is in the idle state. Use scenario: An application\n         * starts playing a media file while the file is still being downloaded from the remote to the local host.\n         * The video formats MP4, MPEG-TS, and MKV are supported.\n         * The audio formats M4A, AAC, MP3, OGG, WAV, FLAC, and AMR are supported.\n         * @type { ?AVDataSrcDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        dataSrc?: AVDataSrcDescriptor;\n        /**\n         * Whether to loop media playback.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Whether to loop media playback. The value true means to loop playback, and false (default) means the opposite.\n         * It is a dynamic attribute and can be set only when the AVPlayer is in the prepared, playing, paused,\n         * or completed state. This setting is not supported in live mode.\n         * @type { boolean }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        loop: boolean;\n        /**\n         * Describes audio interrupt mode, refer to {@link #audio.InterruptMode}. If it is not\n         * set, the default mode will be used. Set it before calling the {@link #play()} in the\n         * first time in order for the interrupt mode to become effective thereafter.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Describes audio interrupt mode. If it is not set, the default mode will be used. The default value is\n         * **SHARE_MODE**. It is a dynamic attribute and can be set only when the AVPlayer is in the prepared,\n         * playing, paused, or completed state. Set it before calling the {@link #play()} in the first time in order\n         * for the interrupt mode to become effective thereafter.\n         * @type { ?audio.InterruptMode }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        audioInterruptMode?: audio.InterruptMode;\n        /**\n         * Describes audio renderer info, refer to {@link #audio.AudioRendererInfo}. Set it before\n         * calling the {@link #prepare()} in the first time in order for the audio renderer info to\n         * become effective thereafter.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 10\n         */\n        /**\n         * Describes audio renderer info. If the media source contains videos, the default value of usage is\n         * **STREAM_USAGE_MOVIE**. Otherwise, the default value of usage is **STREAM_USAGE_MUSIC**. This parameter can\n         * be set only when the AVPlayer is in the initialized state.\n         * Set it before calling the {@link #prepare()} in the first time in order for the audio renderer info to\n         * become effective thereafter.\n         * @type { ?audio.AudioRendererInfo }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        audioRendererInfo?: audio.AudioRendererInfo;\n        /**\n         * Obtains the current audio effect mode, refer to {@link #audio.AudioEffectMode}.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 10\n         */\n        /**\n         * Obtains the current audio effect mode. The audio effect mode is a dynamic attribute and is restored\n         * to the default value **EFFECT_DEFAULT** when usage of audioRendererInfo is changed.\n         * It can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.\n         * @type { ?audio.AudioEffectMode }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        audioEffectMode?: audio.AudioEffectMode;\n        /**\n         * Current playback position.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Current playback position, in ms. It can be used as a query parameter when the AVPlayer is in the prepared,\n         * playing, paused, or completed state. The value -1 indicates an invalid value.\n         * In live mode, -1 is returned by default.\n         * @type { number }\n         * @readonly\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        readonly currentTime: number;\n        /**\n         * Playback duration, When the data source does not support seek, it returns - 1, such as a live broadcast scenario.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Playback duration, When the data source does not support seek, it returns - 1, such as a live broadcast scenario.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Playback duration, in ms. It can be used as a query parameter when the AVPlayer is in the prepared,\n         * playing, paused, or completed state.\n         * When the data source does not support seek, it returns - 1, such as a live broadcast scenario.\n         * @type { number }\n         * @readonly\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        readonly duration: number;\n        /**\n         * Playback state.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Playback state. It can be used as a query parameter when the AVPlayer is in any state.\n         * @type { AVPlayerState }\n         * @readonly\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        readonly state: AVPlayerState;\n        /**\n         * Video player will use this id get a surface instance.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Video player will use this id get a surface instance.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Video player will use this id get a surface instance. This parameter can be set when the AVPlayer\n         * is in the initialized state. It can be set again when the AVPlayer is in the prepared, playing, paused,\n         * completed, or stopped state, in the prerequisite that the video window ID has been set in the initialized state.\n         * After the new setting is performed, the video is played in the new window. It is used to render the window\n         * for video playback and therefore is not required in audio-only playback scenarios.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        surfaceId?: string;\n        /**\n         * Video width, valid after prepared.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Video width, in px, valid after prepared. It can be used as a query parameter when the AVPlayer is in the\n         * prepared, playing, paused, or completed state.\n         * @type { number }\n         * @readonly\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        readonly width: number;\n        /**\n         * Video height, in px, valid after prepared.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Video height, in px, valid after prepared. It can be used as a query parameter when the AVPlayer is in the\n         * prepared, playing, paused, or completed state.\n         * @type { number }\n         * @readonly\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        readonly height: number;\n        /**\n         * Video scale type. By default, the {@link #VIDEO_SCALE_TYPE_FIT} will be used, for more\n         * information, refer to {@link #VideoScaleType} .\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Video scale type. By default, the {@link #VIDEO_SCALE_TYPE_FIT} will be used, for more\n         * information, refer to {@link #VideoScaleType} .\n         * @type { ?VideoScaleType }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        videoScaleType?: VideoScaleType;\n        /**\n         * Set payback speed.\n         * @param { PlaybackSpeed } speed - playback speed, see @PlaybackSpeed .\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Set payback speed. This API can be called only when the AVPlayer is in the prepared, playing, paused,\n         * or completed state. You can check whether the setting takes effect by subscribing to the speedDone event.\n         * This API is not supported in live mode.\n         * @param { PlaybackSpeed } speed - playback speed, see @PlaybackSpeed .\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        setSpeed(speed: PlaybackSpeed): void;\n        /**\n         * Set playback rate.\n         * Supported states: prepared/playing/paused/completed.\n         * @param { number } rate - playback rate, valid range is 0.125 ~ 4.\n         * @throws { BusinessError } 5400108 - The parameter check failed, parameter value out of range.\n         * @throws { BusinessError } 5400102 - Operation not allowed, if invalid state or live stream.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 20\n         */\n        setPlaybackRate(rate: number): void;\n        /**\n         * select a specified bitrate to playback, only valid for HLS protocol network stream. By default, the\n         * player will select the appropriate bitrate according to the network connection speed. The\n         * available bitrate list reported by {@link #on('availableBitrates')}. Set it to select\n         * a specified bitrate. If the specified bitrate is not in the list of available bitrate, the player\n         * will select the minimal and closest one from the available bitrate list.\n         * @param { number } bitrate - the playback bitrate must be expressed in bits per second.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Select a specified bitrate to playback, only valid for HLS protocol network stream. By default, the\n         * player will select the appropriate bitrate according to the network connection speed. The\n         * available bitrate list reported by {@link #on('availableBitrates')}. Set it to select\n         * a specified bitrate. If the specified bitrate is not in the list of available bitrate, the player\n         * will select the minimal and closest one from the available bitrate list.This API can be called\n         * only when the AVPlayer is in the prepared, playing, paused, or completed state.\n         * @param { number } bitrate - \tBit rate to set. Obtain the available bit rates of the current HLS/DASH\n         * stream by subscribing to the {@link #on('availableBitrates')} event. If the bit rate to set is not in\n         * the list of the available bit rates, the AVPlayer selects from the list the bit rate that is closed\n         * to the bit rate to set. If the length of the available bit rate list obtained through the event is 0,\n         * no bit rate can be set and the bitrateDone callback will not be triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        setBitrate(bitrate: number): void;\n        /**\n         * Set decryption session to codec module.\n         * @param { drm.MediaKeySession } mediaKeySession - Handle of MediaKeySession to decrypt encrypted media.\n         * @param { boolean } secureVideoPath - Secure video path required or not.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 11\n         */\n        /**\n         * Set decryption session to codec module. When receiving a mediaKeySystemInfoUpdate event, create the related\n         * configuration and set the decryption configuration based on the information in the reported event.\n         * Otherwise, the playback fails.\n         * @param { drm.MediaKeySession } mediaKeySession - Handle of MediaKeySession to decrypt encrypted media.\n         * @param { boolean } secureVideoPath - Secure video path required or not. The value true means that a secure\n         * video channel is selected, and false means that a non-secure video channel is selected.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        setDecryptionConfig(mediaKeySession: drm.MediaKeySession, secureVideoPath: boolean): void;\n        /**\n         * Get media key system info from media source.\n         * @returns { Array<drm.MediaKeySystemInfo> } MediaKeySystemInfo with PSSH.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 11\n         */\n        /**\n         * Get media key system info from media source.\n         * @returns { Array<drm.MediaKeySystemInfo> } MediaKeySystemInfo with PSSH.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        getMediaKeySystemInfos(): Array<drm.MediaKeySystemInfo>;\n        /**\n         * Register listens for mediaKeySystemInfoUpdate events.\n         * @param { 'mediaKeySystemInfoUpdate' } type - Type of the event to listen for.\n         * @param { function } callback - Callback used to listen for the mediaKeySystemInfoUpdate event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 11\n         */\n        /**\n         * Register listens for mediaKeySystemInfoUpdate events.\n         * @param { 'mediaKeySystemInfoUpdate' } type - Event type, which is **'mediaKeySystemInfoUpdate'** in this case.\n         * This event is triggered when the copyright protection information of the media asset being played changes.\n         * @param { Callback<Array<drm.MediaKeySystemInfo>> } callback - Callback invoked when the event is triggered.\n         * It reports a **MediaKeySystemInfo** array.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'mediaKeySystemInfoUpdate', callback: Callback<Array<drm.MediaKeySystemInfo>>): void;\n        /**\n         * Unregister listens for mediaKeySystemInfoUpdate events.\n         * @param { 'mediaKeySystemInfoUpdate' } type - Type of the event to listen for.\n         * @param { function } callback - Callback for event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 11\n         */\n        /**\n         * Unregister listens for mediaKeySystemInfoUpdate events.\n         * @param { 'mediaKeySystemInfoUpdate' } type - Type of the event to listen for.\n         * @param { Callback<Array<drm.MediaKeySystemInfo>> } callback - Callback for event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'mediaKeySystemInfoUpdate', callback?: Callback<Array<drm.MediaKeySystemInfo>>): void;\n        /**\n         * Register listens for media playback stateChange event.\n         * @param { 'stateChange' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback stateChange event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Register listens for media playback stateChange event.\n         * @param { 'stateChange' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback stateChange event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Register listens for media playback stateChange event.\n         * @param { 'stateChange' } type - Event type, which is **'stateChange'** in this case.\n         * This event can be triggered by both user operations and the system.\n         * @param { OnAVPlayerStateChangeHandle } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'stateChange', callback: OnAVPlayerStateChangeHandle): void;\n        /**\n         * Unregister listens for media playback stateChange event.\n         * @param { 'stateChange' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unregister listens for media playback stateChange event.\n         * @param { 'stateChange' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Unregister listens for media playback stateChange event.\n         * @param { 'stateChange' } type - Type of the playback event to listen for.\n         * @param { OnAVPlayerStateChangeHandle } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'stateChange', callback?: OnAVPlayerStateChangeHandle): void;\n        /**\n         * Register listens for media playback volumeChange event.\n         * @param { 'volumeChange' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to the event to check whether the volume is successfully set.\n         * @param { 'volumeChange' } type - This event is triggered each time **setVolume()** is called.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * It reports the effective volume.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'volumeChange', callback: Callback<number>): void;\n        /**\n         * Unregister listens for media playback volumeChange event.\n         * @param { 'volumeChange' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from the event that checks whether the volume is successfully set.\n         * @param { 'volumeChange' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * It reports the effective volume.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @since 12\n         */\n        off(type: 'volumeChange', callback?: Callback<number>): void;\n        /**\n         * Register listens for media playback endOfStream event.\n         * @param { 'endOfStream' } type - Type of the playback event to listen for.\n         * @param { Callback<void> } callback - Callback used to listen for the playback end of stream.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to the event that indicates the end of the stream being played. If {@link #loop} = true is set,\n         * the AVPlayer seeks to the beginning of the stream and plays the stream again. If loop is not set,\n         * the completed state is reported through the {@link #stateChange} event.\n         * @param { 'endOfStream' } type - Type of the playback event to listen for. This event is triggered\n         * when the AVPlayer finishes playing the media asset.\n         * @param { Callback<void> } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'endOfStream', callback: Callback<void>): void;\n        /**\n         * Unregister listens for media playback endOfStream event.\n         * @param { 'endOfStream' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from the event that indicates the end of the stream being played.\n         * @param { 'endOfStream' } type - Type of the playback event to listen for.\n         * @param { Callback<void> } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @since 12\n         */\n        off(type: 'endOfStream', callback?: Callback<void>): void;\n        /**\n         * Register listens for media playback seekDone event.\n         * @param { 'seekDone' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback seekDone event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Register listens for media playback seekDone event.\n         * @param { 'seekDone' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback seekDone event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Subscribes to the event to check whether the seek operation takes effect.\n         * @param { 'seekDone' } type - Type of the playback event to listen for. This event is triggered each time\n         * **seek()** is called, except in SEEK_CONTINUOUS mode.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * It reports the time position requested by the user.\n         *\n         * For video playback, {@link #SeekMode} may cause the actual position to be different from that requested by\n         * the user.The exact position can be obtained from the currentTime attribute. The time in this callback\n         * only means that the requested seek operation is complete.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'seekDone', callback: Callback<number>): void;\n        /**\n         * Unregister listens for media playback seekDone event.\n         * @param { 'seekDone' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unregister listens for media playback seekDone event.\n         * @param { 'seekDone' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Unsubscribes from the event that checks whether the seek operation takes effect.\n         * @param { 'seekDone' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * It reports the time position requested by the user.\n         *\n         * For video playback, SeekMode may cause the actual position to be different from that requested by the user.\n         * The exact position can be obtained from the currentTime attribute. The time in this callback only means\n         * that the requested seek operation is complete.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'seekDone', callback?: Callback<number>): void;\n        /**\n         * Register listens for media playback speedDone event.\n         * @param { 'speedDone' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback speedDone event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to the event to check whether the playback speed is successfully set.\n         * @param { 'speedDone' } type - Type of the playback event to listen for.\n         * This event is triggered each time **setSpeed()** is called.\n         * @param { Callback<number> } callback - Callback used to return the result. When the call of\n         * setSpeed is successful, the effective speed mode is reported. For details, see {@link #PlaybackSpeed}.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'speedDone', callback: Callback<number>): void;\n        /**\n         * Unregister listens for media playback speedDone event.\n         * @param { 'speedDone' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from the event that checks whether the playback speed is successfully set.\n         * @param { 'speedDone' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to return the result. When the call of\n         * setSpeed is successful, the effective speed mode is reported. For details, see {@link #PlaybackSpeed}.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @since 12\n         */\n        off(type: 'speedDone', callback?: Callback<number>): void;\n        /**\n         * Register listens for media playbackRateDone event.\n         * @param { 'playbackRateDone' } type - Type of the playback event to listen for.\n         * @param { OnPlaybackRateDone } callback - Callback used to listen for the playbackRateDone event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 20\n         */\n        on(type: 'playbackRateDone', callback: OnPlaybackRateDone): void;\n        /**\n         * Unregister listens for media playbackRateDone event.\n         * @param { 'playbackRateDone' } type - Type of the playback event to listen for.\n         * @param { OnPlaybackRateDone } callback - Callback used to listen for the playbackRateDone event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 20\n         */\n        off(type: 'playbackRateDone', callback?: OnPlaybackRateDone): void;\n        /**\n         * Register listens for media playback setBitrateDone event.\n         * @param { 'bitrateDone' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback setBitrateDone event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to the event to check whether the bit rate is successfully set.\n         * @param { 'bitrateDone' } type - Type of the playback event to listen for.\n         * This event is triggered each time **setBitrate()** is called.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * It reports the effective bit rate.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'bitrateDone', callback: Callback<number>): void;\n        /**\n         * Unregister listens for media playback setBitrateDone event.\n         * @param { 'bitrateDone' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from the event that checks whether the bit rate is successfully set.\n         * @param { 'bitrateDone' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * It reports the effective bit rate.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 12\n         */\n        off(type: 'bitrateDone', callback?: Callback<number>): void;\n        /**\n         * Register listens for media playback timeUpdate event.\n         * @param { 'timeUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback timeUpdate event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Register listens for media playback timeUpdate event.\n         * @param { 'timeUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback timeUpdate event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Subscribes to playback position changes. It is used to refresh the current position of the progress bar.\n         * By default, this event is reported every 100 ms. However, it is reported immediately upon\n         * a successful seek operation.\n         * @param { 'timeUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to return the current time.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'timeUpdate', callback: Callback<number>): void;\n        /**\n         * Unregister listens for media playback timeUpdate event.\n         * @param { 'timeUpdate' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unregister listens for media playback timeUpdate event.\n         * @param { 'timeUpdate' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Unsubscribes from playback position changes.\n         * @param { 'timeUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to return the current time.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'timeUpdate', callback?: Callback<number>): void;\n        /**\n         * Register listens for media playback durationUpdate event.\n         * @param { 'durationUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback durationUpdate event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to media asset duration changes. It is used to refresh the length of the progress bar. By\n         * default, this event is reported once in the prepared state. However, it can be repeatedly reported for\n         * special streams that trigger duration changes. The **'durationUpdate'** event is not supported in live mode.\n         * @param { 'durationUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to return the resource duration.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'durationUpdate', callback: Callback<number>): void;\n        /**\n         * Unregister listens for media playback durationUpdate event.\n         * @param { 'durationUpdate' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from media asset duration changes.\n         * @param { 'durationUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to return the resource duration.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @since 12\n         */\n        off(type: 'durationUpdate', callback?: Callback<number>): void;\n        /**\n         * Register listens for video playback buffering events.\n         * @param { 'bufferingUpdate' } type - Type of the playback buffering update event to listen for.\n         * @param { function } callback - Callback used to listen for the buffering update event,\n           * return BufferingInfoType and the value.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to audio and video buffer changes. This subscription is supported only in network\n         * playback scenarios.\n         * @param { 'bufferingUpdate' } type - Type of the playback buffering update event to listen for.\n         * @param { OnBufferingUpdateHandler } callback - Callback invoked when the event is triggered,\n           * and return BufferingInfoType and the value.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'bufferingUpdate', callback: OnBufferingUpdateHandler): void;\n        /**\n         * Unregister listens for video playback buffering events.\n         * @param { 'bufferingUpdate' } type - Type of the playback buffering update event to listen for.\n           * return BufferingInfoType and the value.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from audio and video buffer changes.\n         * @param { 'bufferingUpdate' } type - Type of the playback buffering update event to listen for.\n         * @param { OnBufferingUpdateHandler } callback - Callback invoked when the event is triggered.,\n           * and return BufferingInfoType and the value.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'bufferingUpdate', callback?: OnBufferingUpdateHandler): void;\n        /**\n         * Register listens for start render video frame events.\n         * @param { 'startRenderFrame' } type - Type of the playback event to listen for.\n         * @param { Callback<void> } callback - Callback used to listen for the playback event return .\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to the event that indicates rendering starts for the first frame. This subscription is\n         * supported only in video playback scenarios. This event only means that the playback service sends\n         * the first frame to the display module. The actual rendering effect depends on the rendering performance\n         * of the display service.\n         * @param { 'startRenderFrame' } type - Type of the playback event to listen for.\n         * @param { Callback<void> } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'startRenderFrame', callback: Callback<void>): void;\n        /**\n         * Unregister listens for start render video frame events.\n         * @param { 'startRenderFrame' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from the event that indicates rendering starts for the first frame.\n         * @param { 'startRenderFrame' } type - Type of the playback event to listen for.\n         * @param { Callback<void> } callback - \tCallback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 12\n         */\n        off(type: 'startRenderFrame', callback?: Callback<void>): void;\n        /**\n         * Register listens for video size change event.\n         * @param { 'videoSizeChange' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback event return video size.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Subscribes to video size (width and height) changes. This subscription is supported only in video playback\n         * scenarios. By default, this event is reported only once in the prepared state. However, it is also reported\n         * upon resolution changes in the case of HLS streams.\n         * @param { 'videoSizeChange' } type - Type of the playback event to listen for.\n         * @param { OnVideoSizeChangeHandler } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'videoSizeChange', callback: OnVideoSizeChangeHandler): void;\n        /**\n         * Unregister listens for video size change event.\n         * @param { 'videoSizeChange' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unsubscribes from video size changes.\n         * @param { 'videoSizeChange' } type - Type of the playback event to listen for.\n         * @param { OnVideoSizeChangeHandler } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'videoSizeChange', callback?: OnVideoSizeChangeHandler): void;\n        /**\n         * Register listens for audio interrupt event, refer to {@link #audio.InterruptEvent}\n         * @param { 'audioInterrupt' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback event return audio interrupt info.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Register listens for audio interrupt event, refer to {@link #audio.InterruptEvent}.\n         * The application needs to perform corresponding processing based on different audio interruption events.\n         * For details, see Handling Audio Interruption Events.\n         * @param { 'audioInterrupt' } type - Type of the playback event to listen for.\n         * @param { Callback<audio.InterruptEvent> } callback - Callback used to listen for the playback event return audio interrupt info.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'audioInterrupt', callback: Callback<audio.InterruptEvent>): void;\n        /**\n         * Unregister listens for audio interrupt event, refer to {@link #audio.InterruptEvent}\n         * @param { 'audioInterrupt' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unregister listens for audio interrupt event, refer to {@link #audio.InterruptEvent}\n         * @param { 'audioInterrupt' } type - Type of the playback event to listen for.\n         * @param { Callback<audio.InterruptEvent> } callback - Callback used to listen for the playback event return audio interrupt info.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'audioInterrupt', callback?: Callback<audio.InterruptEvent>): void;\n        /**\n         * Register listens for available bitrate list collect completed events for HLS protocol stream playback.\n         * This event will be reported after the {@link #prepare} called.\n         * @param { 'availableBitrates' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback event return available bitrate list.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Register listens for available bitrate list collect completed events for HLS protocol stream playback.\n         * This event will be reported after the {@link #prepare} called.\n         * @param { 'availableBitrates' } type - Type of the playback event to listen for.\n         * This event is triggered once after the AVPlayer switches to the prepared state.\n         * @param { Callback<Array<number>> } callback - Callback used to listen for the playback event return available bitrate list.\n         * It returns an array that holds the available bit rates. If the array length is 0, no bit rate can be set.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'availableBitrates', callback: Callback<Array<number>>): void;\n        /**\n         * Unregister listens for available bitrate list collect completed events for HLS protocol stream playback.\n         * This event will be reported after the {@link #prepare} called.\n         * @param { 'availableBitrates' } type - Type of the playback event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unregister listens for available bitrate list collect completed events for HLS protocol stream playback.\n         * This event will be reported after the {@link #prepare} called.\n         * @param { 'availableBitrates' } type - Type of the playback event to listen for.\n         * @param { Callback<Array<number>> } callback - Callback used to listen for the playback event return available bitrate list.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'availableBitrates', callback?: Callback<Array<number>>): void;\n        /**\n         * Register listens for playback error events.\n         * @param { 'error' } type - Type of the playback error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the playback error event.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - The parameter check failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Register listens for playback error events.\n         * @param { 'error' } type - Type of the playback error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the playback error event.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Register listens for playback error events.\n         * @param { 'error' } type - Type of the playback error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the playback error event.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - The parameter check failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Subscribes to AVPlayer errors. This event is used only for error prompt and does not require the user to stop\n         * playback control. If AVPlayerState is also switched to error, call {@link #reset()} or {@link #release()}\n         * to exit the playback.\n         * @param { 'error' } type - Event type, which is **'error'** in this case. This event can be triggered by\n         * both user operations and the system.\n         * @param { ErrorCallback } callback - Callback used to listen for the playback error event.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - The parameter check failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @throws { BusinessError } 5411001 - IO can not find host.\n         * @throws { BusinessError } 5411002 - IO connection timeout.\n         * @throws { BusinessError } 5411003 - IO network abnormal.\n         * @throws { BusinessError } 5411004 - IO network unavailable.\n         * @throws { BusinessError } 5411005 - IO no permission.\n         * @throws { BusinessError } 5411006 - IO request denied.\n         * @throws { BusinessError } 5411007 - IO resource not found.\n         * @throws { BusinessError } 5411008 - IO SSL client cert needed.\n         * @throws { BusinessError } 5411009 - IO SSL connect fail.\n         * @throws { BusinessError } 5411010 - IO SSL server cert untrusted.\n         * @throws { BusinessError } 5411011 - IO unsupported request.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 14\n         */\n        on(type: 'error', callback: ErrorCallback): void;\n        /**\n         * Unregister listens for playback error events.\n         * @param { 'error' } type - Type of the playback error event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 9\n         */\n        /**\n         * Unregister listens for playback error events.\n         * @param { 'error' } type - Type of the playback error event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Unsubscribes from AVPlayer errors.\n         * @param { 'error' } type - Event type, which is **'error'** in this case.\n         * @param { ErrorCallback } callback - Callback used to return the error code ID and error message.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'error', callback?: ErrorCallback): void;\n        /**\n         * Subscribes output device change event callback.\n         * The event is triggered when output device change for this stream.\n         * @param { 'audioOutputDeviceChangeWithInfo' } type - Type of the event to listen for.\n         * @param { Callback<audio.AudioStreamDeviceChangeInfo> } callback - Callback used to listen device change event.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 11\n         */\n        /**\n         * Subscribes to audio stream output device changes and reasons. This API uses an asynchronous callback\n         * to return the result.\n         *\n         * When subscribing to this event, you are advised to implement the player behavior when the device is\n         * connected or disconnected by referring to Responding to Audio Output Device Changes.\n         * @param { 'audioOutputDeviceChangeWithInfo' } type - Type of the event to listen for.\n         * The event is triggered when the output device is changed.\n         * @param { Callback<audio.AudioStreamDeviceChangeInfo> } callback - \tCallback used to return the output device\n         * descriptor of the current audio stream and the change reason.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'audioOutputDeviceChangeWithInfo', callback: Callback<audio.AudioStreamDeviceChangeInfo>): void;\n        /**\n         * Unsubscribes output device change event callback.\n         * @param { 'audioOutputDeviceChangeWithInfo' } type - Type of the event to listen for.\n         * @param { Callback<audio.AudioStreamDeviceChangeInfo> } callback - Callback used to listen device change event.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 11\n         */\n        /**\n         * Unsubscribes from audio stream output device changes and reasons. This API uses an asynchronous callback\n         * to return the result.\n         * @param { 'audioOutputDeviceChangeWithInfo' } type - Type of the event to listen for.\n         * @param { Callback<audio.AudioStreamDeviceChangeInfo> } callback - Callback used to return the output device\n         * descriptor of the current audio stream and the change reason.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'audioOutputDeviceChangeWithInfo', callback?: Callback<audio.AudioStreamDeviceChangeInfo>): void;\n        /**\n         * Subscribes to subtitle update events. When external subtitles exist, the system notifies the application\n         * through the subscribed-to callback. An application can subscribe to only one subtitle update event. When\n         * the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'subtitleUpdate' } type - Type of the event to listen for.\n         * The event is triggered when the external subtitle is updated.\n         * @param { Callback<SubtitleInfo> } callback - Callback invoked when the subtitle is updated.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'subtitleUpdate', callback: Callback<SubtitleInfo>): void;\n        /**\n         * Unsubscribes from subtitle update events.\n         * @param { 'subtitleUpdate' } type - Type of the event to listen for.\n         * @param { Callback<SubtitleInfo> } callback - Callback that has been registered to listen for subtitle\n         * update events.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'subtitleUpdate', callback?: Callback<SubtitleInfo>): void;\n        /**\n         * Subscribes to track change events. When the track changes, the system notifies the application through\n         * the subscribed-to callback. An application can subscribe to only one track change event. When the\n         * application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'trackChange' } type - Type of the event to listen for.\n         * The event is triggered when the track changes.\n         * @param { OnTrackChangeHandler } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'trackChange', callback: OnTrackChangeHandler): void;\n        /**\n         * Unsubscribes from track change events.\n         * @param { 'trackChange' } type - Type of the event to listen for.\n         * The event is triggered when the track changes.\n         * @param { OnTrackChangeHandler } callback - Callback that has been registered to listen for track changes.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'trackChange', callback?: OnTrackChangeHandler): void;\n        /**\n         * Subscribes to track information update events. When the track information is updated, the system notifies the\n         * application through the subscribed-to callback. An application can subscribe to only one track change event.\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'trackInfoUpdate' } type - Type of the event to listen for.\n         * The event is triggered when the track information is updated.\n         * @param { Callback<Array<MediaDescription>> } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'trackInfoUpdate', callback: Callback<Array<MediaDescription>>): void;\n        /**\n         * Unsubscribes from track information update events.\n         * @param { 'trackInfoUpdate' } type - Type of the event to listen for.\n         * The event is triggered when the track information is updated.\n         * @param { Callback<Array<MediaDescription>> } callback - Callback that has been registered to listen for track\n         * information updates.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'trackInfoUpdate', callback?: Callback<Array<MediaDescription>>): void;\n        /**\n         * Subscribes to update events of the maximum audio level value, which is periodically reported when audio\n         * resources are played.\n         * @param { 'amplitudeUpdate' } type - Type of the event to listen for.\n         * The event is triggered when the amplitude changes.\n         * @param { Callback<Array<number>> } callback - Callback invoked when the event is triggered.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 13\n         */\n        on(type: 'amplitudeUpdate', callback: Callback<Array<number>>): void;\n        /**\n         * Unsubscribes from update events of the maximum amplitude.\n         * @param { 'amplitudeUpdate' } type - Type of the event to listen for.\n         * The event is triggered when the amplitude changes.\n         * @param { Callback<Array<number>> } callback - Callback that has been registered to listen for amplitude updates.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 13\n         */\n        off(type: 'amplitudeUpdate', callback?: Callback<Array<number>>): void;\n        /**\n         * Subscribes to events indicating that a Supplemental Enhancement Information (SEI) message is received. This\n         * applies only to HTTP-FLV live streaming and is triggered when SEI messages are present in the video stream.\n         * You must initiate the subscription before calling {@link #prepare}. If you initiate multiple subscriptions\n         * to this event, the last subscription is applied.\n         * @param { 'seiMessageReceived' } type - Type of the playback event to listen for.\n         * The event is triggered when an SEI message is received.\n         * @param { Array<number> } payloadTypes - Array of subscribed-to payload types of SEI messages. Currently,\n         * only payloadType = 5 is supported.\n         * @param { OnSeiMessageHandle } callback - Callback used to listen for SEI message events and receive the\n         * subscribed-to payload types.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        on(type: 'seiMessageReceived', payloadTypes: Array<number>, callback: OnSeiMessageHandle): void;\n        /**\n         * Unsubscribes from the events indicating that an SEI message is received.\n         * @param { 'seiMessageReceived' } type - Type of the playback event to listen for.\n         * The event is triggered when an SEI message is received.\n         * @param { Array<number> } payloadTypes - The payload types of the SEI message.\n         *                                        Null means unsubscribe all payload types.\n    \n         * @param { OnSeiMessageHandle } callback -\tCallback used to listen for SEI message events and receive the\n         * subscribed-to payload types.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        off(type: 'seiMessageReceived', payloadTypes?: Array<number>, callback?: OnSeiMessageHandle): void;\n        /**\n         * Subscribes to the event indicating that super resolution is enabled or disabled.\n         * @param { 'superResolutionChanged' } type - Type of the super-resolution event to listen for.\n         * The event is triggered when super resolution is enabled or disabled.\n         * @param { OnSuperResolutionChanged } callback - Callback used to listen for the super-resolution changed event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        on(type: 'superResolutionChanged', callback: OnSuperResolutionChanged): void;\n        /**\n         * Unsubscribes from the event indicating that super resolution is enabled or disabled.\n         * @param { 'superResolutionChanged' } type - Type of the super-resolution event to listen for.\n         * The event is triggered when super resolution is enabled or disabled.\n         * @param { OnSuperResolutionChanged } callback - Callback used to listen for the super-resolution changed event.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 18\n         */\n        off(type: 'superResolutionChanged', callback?: OnSuperResolutionChanged): void;\n    }\n    /**\n     * Provides player statistic info.\n     *\n     * @typedef PlaybackInfo\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 12\n     */\n    interface PlaybackInfo {\n        /**\n         * key:value pair, key see @PlaybackInfoKey.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        [key: string]: Object;\n    }\n    /**\n     * Enumerates statistics info keys for player.\n     *\n     * @enum { string }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 12\n     */\n    enum PlaybackInfoKey {\n        /**\n         * IP address of current network stream.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        SERVER_IP_ADDRESS = 'server_ip_address',\n        /**\n         * Average download rate during playing except for suspend downloading.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        AVG_DOWNLOAD_RATE = 'average_download_rate',\n        /**\n         * Current download rate of the last second except for suspend downloading.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        DOWNLOAD_RATE = 'download_rate',\n        /**\n         * Boolean value, true for current is downloading, false for suspend downloading.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        IS_DOWNLOADING = 'is_downloading',\n        /**\n         * Cached duration in milliseconds.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        BUFFER_DURATION = 'buffer_duration'\n    }\n    /**\n     * Enumerates ErrorCode types, return in BusinessError::code\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     * @deprecated since 11\n     * @useinstead ohos.multimedia.media/media.AVErrorCode\n     */\n    enum MediaErrorCode {\n        /**\n         * operation success.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_OK\n         */\n        MSERR_OK = 0,\n        /**\n         * malloc or new memory failed. maybe system have no memory.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_NO_MEMORY\n         */\n        MSERR_NO_MEMORY = 1,\n        /**\n         * no permission for the operation.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_OPERATE_NOT_PERMIT\n         */\n        MSERR_OPERATION_NOT_PERMIT = 2,\n        /**\n         * invalid argument.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_INVALID_PARAMETER\n         */\n        MSERR_INVALID_VAL = 3,\n        /**\n         * an I/O error occurred.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_IO\n         */\n        MSERR_IO = 4,\n        /**\n         * operation time out.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_TIMEOUT\n         */\n        MSERR_TIMEOUT = 5,\n        /**\n         * unknown error.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_INVALID_PARAMETER\n         */\n        MSERR_UNKNOWN = 6,\n        /**\n         * media service died.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_SERVICE_DIED\n         */\n        MSERR_SERVICE_DIED = 7,\n        /**\n         * operation is not permit in current state.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_INVALID_PARAMETER\n         */\n        MSERR_INVALID_STATE = 8,\n        /**\n         * operation is not supported in current version.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         * @deprecated since 11\n         * @useinstead ohos.multimedia.media/media.AVErrorCode#AVERR_UNSUPPORT_CAPABILITY\n         */\n        MSERR_UNSUPPORTED = 9\n    }\n    /**\n     * Enumerates buffering info type, for network playback.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     */\n    /**\n     * Enumerates buffering info type, for network playback.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum BufferingInfoType {\n        /**\n         * begin to buffering\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * begin to buffering\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        BUFFERING_START = 1,\n        /**\n         * end to buffering\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * end to buffering\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        BUFFERING_END = 2,\n        /**\n         * buffering percent\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * buffering percent\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        BUFFERING_PERCENT = 3,\n        /**\n         * cached duration in milliseconds\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * cached duration in milliseconds\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        CACHED_DURATION = 4\n    }\n    /**\n     * Defines the SourceOpenCallback function which is called by the service. client should process the incoming request\n     * and return the unique handle to the open resource.\n     * <br>**NOTE:**<br>\n     * The client must return the handle immediately after processing the request.\n     *\n     * @typedef { function } SourceOpenCallback\n     * @param { MediaSourceLoadingRequest } request - Parameters for the resource open request, including detailed\n     * information about the requested resource and the data push method.\n     * @returns { number } - return the handle of current resource open request.\n     *                        A value greater than 0 means the request is successful.\n     *                        A value less than or equal to 0 means it fails.\n     *                     - client should return immediately.\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 18\n     */\n    type SourceOpenCallback = (request: MediaSourceLoadingRequest) => number;\n    /**\n     * Defines the SourceReadCallback function which is called by the service. Client should record the read requests\n     * and push the data through the {@link #response} method of the request object when there is sufficient data.\n     * <br>**NOTE:**<br>\n     * The client must return the handle immediately after processing the request.\n     * @typedef { function } SourceReadCallback\n     * @param { number } uuid - ID for the resource handle.\n     * @param { number } requestedOffset - Offset of the current media data relative to the start of the resource.\n     * @param { number } requestedLength - Length of the current request.\n     *                                   - -1 means reaching the end of the source, need to inform the player\n     *                                     of the end of the push through the {@link #finishLoading} method.\n     * @returns { void } - client should return immediately.\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 18\n     */\n    type SourceReadCallback = (uuid: number, requestedOffset: number, requestedLength: number) => void;\n    /**\n     * Defines the SourceCloseCallback function which is called by the service. Client should release related resources.\n     * <br>**NOTE:**<br>\n     * The client must return the handle immediately after processing the request.\n     * @typedef { function } SourceCloseCallback\n     * @param { number } uuid - ID for the resource handle.\n     * @returns { void } - client should return immediately.\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 18\n     */\n    type SourceCloseCallback = (uuid: number) => void;\n    /**\n     * Defines a media data loader, which needs to be implemented by applications.\n     * @typedef MediaSourceLoader\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 18\n     */\n    interface MediaSourceLoader {\n        /**\n         * Callback function is implemented by application, which is used to handle resource opening requests.\n         * @type { SourceOpenCallback }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        open: SourceOpenCallback;\n        /**\n         * Callback function is implemented by application, which is used to handle resource read requests.\n         * @type { SourceReadCallback }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        read: SourceReadCallback;\n        /**\n         * Callback function is implemented by application, which is used to handle resource close request.\n         * @type { SourceCloseCallback }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        close: SourceCloseCallback;\n    }\n    /**\n     * Enumerates state change reason.\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 18\n     */\n    enum LoadingRequestError {\n        /**\n         * If reach the resource end, client should return.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        LOADING_ERROR_SUCCESS = 0,\n        /**\n         * If resource not ready for access, client should return.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        LOADING_ERROR_NOT_READY = 1,\n        /**\n         * If resource url not exist, client should return.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        LOADING_ERROR_NO_RESOURCE = 2,\n        /**\n         * If the uuid of resource handle is valid, client should return.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n        */\n        LOADING_ERROR_INVAID_HANDLE = 3,\n        /**\n         * If client has no right to request the resource, client should return.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        LOADING_ERROR_ACCESS_DENIED = 4,\n        /**\n         * If access time out, client should return.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        LOADING_ERROR_ACCESS_TIMEOUT = 5,\n        /**\n         * If authorization failed, client should return.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        LOADING_ERROR_AUTHORIZE_FAILED = 6\n    }\n    /**\n     * Loading Request object. Application obtains the requested resource location through this object\n     * and send data to AVPlayer.\n     * @typedef MediaSourceLoadingRequest\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 18\n     */\n    interface MediaSourceLoadingRequest {\n        /**\n         * Location for resource to be opened by the application.\n         * @type { string }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        url: string;\n        /**\n         * HTTP request header. If the header exists, the application should set the header information in\n         * the HTTP request when downloading data.\n         * @type { ?Record<string, string> }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        header?: Record<string, string>;\n        /**\n         * The interface for application used to send requested data to AVPlayer.\n         * @param { number } uuid - ID for the resource handle.\n         * @param { number } offset - Offset of the current media data relative to the start of the resource.\n         * @param { ArrayBuffer } buffer - Media data sent to the player.\n         * @returns { number } - accept bytes for current read. The value less than zero means failed.\n         *                    - 2, means player need current data any more, the client should stop current read process.\n         *                    - 3, means player buffer is full, the client should wait for next read.\n         * @syscap  SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        respondData(uuid: number, offset: number, buffer: ArrayBuffer): number;\n        /**\n         * The interface for application used to send respond header to AVPlayer\n         * should be called before calling the {@link #respondData()} for the first time.\n         * @param { number } uuid - ID for the resource handle.\n         * @param { ?Record<string, string> } [header] - header info in the http response.\n         * The application can intersect the header fields with the fields supported by the underlying layer for\n         * parsing or directly pass in all corresponding header information.\n         * @param { ?string } [redirectUrl] - redirect url from the http response if exist.\n         * @syscap  SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        respondHeader(uuid: number, header?: Record<string, string>, redirectUrl?: string): void;\n        /**\n         * Notifies the player of the current request status. After pushing all the data for a single resource, the\n         * application should send the **LOADING_ERROR_SUCCESS** state to notify the player that the resource push is\n         * complete.\n         * @param { number } uuid - ID for the resource handle.\n         * @param { LoadingRequestError } state - Request status.\n         * @syscap  SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        finishLoading(uuid: number, state: LoadingRequestError): void;\n    }\n    /**\n     * Media Stream. AVPlayer use this for mediaData access, current version only support live stream.\n     * @typedef MediaStream\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 19\n     */\n    interface MediaStream {\n        /**\n         * url for this mediaStream\n         * @type { string }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 19\n         */\n        url: string;\n        /**\n         * video width.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 19\n         */\n        width: number;\n        /**\n         * video height.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 19\n         */\n        height: number;\n        /**\n         * biterate of this mediaStream.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 19\n         */\n        bitrate: number;\n    }\n    /**\n     * Media source descriptor. User can set media data information\n  \n     * @typedef MediaSource\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 12\n     */\n    interface MediaSource {\n        /**\n         * Set Media Mime Type to help player handle extended Media source.\n         * @param { AVMimeTypes } mimeType - for MediaSource define. see @ AVMimeTypes.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        setMimeType(mimeType: AVMimeTypes): void;\n        /**\n         * Set Media source loader to help player access MediaData.\n         * @param { MediaSourceLoader } resourceLoader - callback function interface set for player use.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        setMediaResourceLoaderDelegate(resourceLoader: MediaSourceLoader): void;\n    }\n    /**\n     * Enumerates Media Mime types, used for MediaSource define;\n     * @enum { string }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 12\n     */\n    enum AVMimeTypes {\n        /**\n         * Indicate current file is index file for hls Media.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        APPLICATION_M3U8 = 'application/m3u8'\n    }\n    /**\n     * Provides preferred playback settings for player.\n     *\n     * @typedef PlaybackStrategy\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 12\n     */\n    interface PlaybackStrategy {\n        /**\n         * Choose a stream with width close to it.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        preferredWidth?: number;\n        /**\n         * Choose a stream with height close to it.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        preferredHeight?: number;\n        /**\n         * Chooses a preferred buffer duration.\n         *\n         * <p>The preferred buffer duration in the playback policy, is used to set the buffer size. For details,\n         * see [Online Video Frame Freezing Optimization Practice]{@link\n         * https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-online-video-playback-lags-practice}.</p>\n         *\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        preferredBufferDuration?: number;\n        /**\n         * If true, the player should choose HDR stream if exist.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        preferredHdr?: boolean;\n        /**\n         * mute the specified media stream when playing.\n         * @type { ?MediaType }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        mutedMediaType?: MediaType;\n        /**\n         * Audio language.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 13\n         */\n        preferredAudioLanguage?: string;\n        /**\n         * Subtitle language.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 13\n         */\n        preferredSubtitleLanguage?: string;\n        /**\n         * Show first frame on prepare.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 17\n         */\n        showFirstFrameOnPrepare?: boolean;\n        /**\n         * Customize the buffering threshold for start or restart playing. The unit is second.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        preferredBufferDurationForPlaying?: number;\n        /**\n         * Enable super-resolution feature. default is false.\n         * Must enable super-resolution feature before calling {@link #setSuperResolution} and {@link #setVideoWindowSize}.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        enableSuperResolution?: boolean;\n        /**\n         * set max buffering threshold for liveStreaming or avplayer while change the speed.\n         * It is recommended that the value be 2 seconds greater than the starting waterline.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        thresholdForAutoQuickPlay?: number;\n    }\n    /**\n     * Media file descriptor. The caller needs to ensure that the fd is valid and\n     * the offset and length are correct.\n     *\n     * @typedef AVFileDescriptor\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 9\n     */\n    /**\n     * Media file descriptor. The caller needs to ensure that the fd is valid and\n     * the offset and length are correct.\n     *\n     * @typedef AVFileDescriptor\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Media file descriptor. The caller needs to ensure that the fd is valid and\n     * the offset and length are correct.\n     *\n     * @typedef AVFileDescriptor\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    interface AVFileDescriptor {\n        /**\n         * The file descriptor of audio or video source from file system. The caller\n         * is responsible to close the file descriptor.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * The file descriptor of audio or video source from file system. The caller\n         * is responsible to close the file descriptor.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * The file descriptor of audio or video source from file system. The caller\n         * is responsible to close the file descriptor.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        fd: number;\n        /**\n         * The offset into the file where the data to be read, in bytes. By default,\n         * the offset is zero.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * The offset into the file where the data to be read, in bytes. By default,\n         * the offset is zero.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * The offset into the file where the data to be read, in bytes. By default,\n         * the offset is zero.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        offset?: number;\n        /**\n         * The length in bytes of the data to be read. By default, the length is the\n         * rest of bytes in the file from the offset.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 9\n         */\n        /**\n         * The length in bytes of the data to be read. By default, the length is the\n         * rest of bytes in the file from the offset.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * The length in bytes of the data to be read. By default, the length is the\n         * rest of bytes in the file from the offset.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        length?: number;\n    }\n    /**\n      * DataSource descriptor. The caller needs to ensure that the fileSize and\n      * callback is valid.\n      *\n      * @typedef AVDataSrcDescriptor\n      * @syscap SystemCapability.Multimedia.Media.AVPlayer\n      * @since 10\n      */\n    /**\n     * DataSource descriptor. The caller needs to ensure that the fileSize and\n     * callback is valid.\n     *\n     * @typedef AVDataSrcDescriptor\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Defines the descriptor of an audio and video file, which is used in DataSource playback mode.\n     * Use scenario: An application can create a playback instance and start playback before it finishes\n     * downloading the audio and video resources.\n     *\n     * @typedef AVDataSrcDescriptor\n     * @syscap SystemCapability.Multimedia.Media.AVPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    interface AVDataSrcDescriptor {\n        /**\n         * Size of the file, -1 means the file size is unknown, in this case,\n         * seek and setSpeed can't be executed, loop can't be set, and can't replay.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 10\n         */\n        /**\n         * Size of the file, -1 means the file size is unknown, in this case,\n         * seek and setSpeed can't be executed, loop can't be set, and can't replay.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Size of the file, -1 means the file size is unknown, in this case,\n         * seek and setSpeed can't be executed, loop can't be set, and can't replay.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        fileSize: number;\n        /**\n         * Callback function implemented by users, which is used to fill data.\n         * buffer - The buffer need to fill.\n         * length - The stream length player want to get.\n         * pos - The stream position player want get start, and is an optional parameter.\n         * When fileSize set to -1, this parameter is not used.\n         * Returns length of the data to be filled.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @since 10\n         */\n        /**\n         * Callback function implemented by users, which is used to fill data.\n         * buffer - The buffer need to fill.\n         * length - The stream length player want to get.\n         * pos - The stream position player want get start, and is an optional parameter.\n         * When fileSize set to -1, this parameter is not used.\n         * Returns length of the data to be filled.\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Callback function implemented by users, which is used to fill data.\n         * buffer - The buffer need to fill.\n         * length - The stream length player want to get.\n         * pos - The stream position player want get start, and is an optional parameter.\n         * When fileSize set to -1, this parameter is not used.\n         * Returns length of the data to be filled, Return -1 to indicate that the end of the stream is reached,\n         * Return -2 to indicate that an unrecoverable error has been encountered.\n         * @type { function }\n         * @syscap SystemCapability.Multimedia.Media.AVPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        callback: (buffer: ArrayBuffer, length: number, pos?: number) => number;\n    }\n    /**\n     * Provides subtitle information. When a subtitle update event is subscribed to, the information about the\n     * external subtitle is returned through a callback.\n     * Can be synchronized to the time reported by AVPlayer#timeUpdate event\n     *\n     * @typedef SubtitleInfo\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 12\n     */\n    interface SubtitleInfo {\n        /**\n         * Duration of the text to be displayed, as milliseconds.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        duration?: number;\n        /**\n         * Display start time of the text, as milliseconds.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        startTime?: number;\n        /**\n         * Text information of current update event.\n         * @type { ?string }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        text?: string;\n    }\n    /**\n     * Describes audio playback states.\n     * @typedef { 'idle' | 'playing' | 'paused' | 'stopped' | 'error' }\n     * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n     * @since 6\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media.AVPlayerState\n     */\n    type AudioState = 'idle' | 'playing' | 'paused' | 'stopped' | 'error';\n    /**\n     * Manages and plays audio. Before calling an AudioPlayer method, you must use createAudioPlayer()\n     * to create an AudioPlayer instance.\n     *\n     * @typedef AudioPlayer\n     * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n     * @since 6\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media.AVPlayer\n     */\n    interface AudioPlayer {\n        /**\n         * Starts audio playback.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#play\n         */\n        play(): void;\n        /**\n         * Pauses audio playback.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#pause\n         */\n        pause(): void;\n        /**\n         * Stops audio playback.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#stop\n         */\n        stop(): void;\n        /**\n         * Resets audio playback.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 7\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#reset\n         */\n        reset(): void;\n        /**\n         * Jumps to the specified playback position.\n         * @param { number } timeMs - Playback position to jump\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#seek\n         */\n        seek(timeMs: number): void;\n        /**\n         * Sets the volume.\n         * @param { number } vol - Relative volume. The value ranges from 0.00 to 1.00. The value 1 indicates the maximum volume (100%).\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#setVolume\n         */\n        setVolume(vol: number): void;\n        /**\n         * Releases resources used for audio playback.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#release\n         */\n        release(): void;\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @param { AsyncCallback<Array<MediaDescription>> } callback - async callback return track info in MediaDescription.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#getTrackDescription\n         */\n        getTrackDescription(callback: AsyncCallback<Array<MediaDescription>>): void;\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @returns { Promise<Array<MediaDescription>> } A Promise instance used to return the track info in MediaDescription.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#getTrackDescription\n         */\n        getTrackDescription(): Promise<Array<MediaDescription>>;\n        /**\n         * Listens for audio playback buffering events.\n         * @param { 'bufferingUpdate' } type - Type of the playback buffering update event to listen for.\n         * @param { function } callback - Callback used to listen for the buffering update event,\n         * return BufferingInfoType and the value.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:bufferingUpdate\n         */\n        on(type: 'bufferingUpdate', callback: (infoType: BufferingInfoType, value: number) => void): void;\n        /**\n         * Audio media URI. Mainstream audio formats are supported.\n         * local:fd://XXX, file://XXX. network:http://xxx\n         * @type { string }\n         * @permission ohos.permission.READ_MEDIA or ohos.permission.INTERNET\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#url\n         */\n        src: string;\n        /**\n         * Audio file descriptor. Mainstream audio formats are supported.\n         * @type { AVFileDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 9\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#fdSrc\n         */\n        fdSrc: AVFileDescriptor;\n        /**\n         * Whether to loop audio playback. The value true means to loop playback.\n         * @type { boolean }\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#loop\n         */\n        loop: boolean;\n        /**\n         * Describes audio interrupt mode, refer to {@link #audio.InterruptMode}. If it is not\n         * set, the default mode will be used. Set it before calling the {@link #play()} in the\n         * first time in order for the interrupt mode to become effective thereafter.\n         * @type { ?audio.InterruptMode }\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 9\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#audioInterruptMode\n         */\n        audioInterruptMode?: audio.InterruptMode;\n        /**\n         * Current playback position.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#currentTime\n         */\n        readonly currentTime: number;\n        /**\n         * Playback duration, When the data source does not support seek, it returns - 1, such as a live broadcast scenario.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#duration\n         */\n        readonly duration: number;\n        /**\n         * Playback state.\n         * @type { AudioState }\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#state\n         */\n        readonly state: AudioState;\n        /**\n         * Listens for audio playback events.\n         * @param { 'play' | 'pause' | 'stop' | 'reset' | 'dataLoad' | 'finish' | 'volumeChange' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback event.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:stateChange\n         */\n        on(type: 'play' | 'pause' | 'stop' | 'reset' | 'dataLoad' | 'finish' | 'volumeChange', callback: () => void): void;\n        /**\n         * Listens for audio playback events.\n         * @param { 'timeUpdate' } type - Type of the playback event to listen for.\n         * @param { Callback<number> } callback - Callback used to listen for the playback event.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:timeUpdate\n         */\n        on(type: 'timeUpdate', callback: Callback<number>): void;\n        /**\n         * Listens for audio interrupt event, refer to {@link #audio.InterruptEvent}\n         * @param { 'audioInterrupt' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback event return audio interrupt info.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 9\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:audioInterrupt\n         */\n        on(type: 'audioInterrupt', callback: (info: audio.InterruptEvent) => void): void;\n        /**\n         * Listens for playback error events.\n         * @param { 'error' } type - Type of the playback error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the playback error event.\n         * @syscap SystemCapability.Multimedia.Media.AudioPlayer\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:error\n         */\n        on(type: 'error', callback: ErrorCallback): void;\n    }\n    /**\n     * Describes media recorder states.\n     * @typedef {'idle' | 'prepared' | 'started' | 'paused' | 'stopped' | 'released' | 'error'}\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Describes media recorder states.\n     * @typedef {'idle' | 'prepared' | 'started' | 'paused' | 'stopped' | 'released' | 'error'}\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type AVRecorderState = 'idle' | 'prepared' | 'started' | 'paused' | 'stopped' | 'released' | 'error';\n    /**\n     * Defines the onMove callback.\n     *\n     * @typedef { function } OnAVRecorderStateChangeHandler\n     * @param { AVRecorderState } state - state value for AVRecorder.\n     * @param { StateChangeReason } reason - reason for state change.\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type OnAVRecorderStateChangeHandler = (state: AVRecorderState, reason: StateChangeReason) => void;\n    /**\n     * Manages and record audio/video. Before calling an AVRecorder method, you must use createAVRecorder()\n     * to create an AVRecorder instance.\n     *\n     * @typedef AVRecorder\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Manages and record audio/video. Before calling an AVRecorder method, you must use createAVRecorder()\n     * to create an AVRecorder instance.\n     *\n     * @typedef AVRecorder\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    interface AVRecorder {\n        /**\n         * Prepares for recording.\n         * @permission ohos.permission.MICROPHONE\n         * @param { AVRecorderConfig } config - Recording parameters.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when prepare completed.\n         * @throws { BusinessError } 201 - Permission denied. Return by callback.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Sets audio and video recording parameters. This API uses an asynchronous callback to return the result.\n         * @permission ohos.permission.MICROPHONE\n         * @param { AVRecorderConfig } config - Audio and video recording parameters to set.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 201 - Permission denied. Return by callback.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * 2. Incorrect parameter types. 3.Parameter verification failed.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * // Configure the parameters based on those supported by the hardware device.\n         * let avRecorderProfile: media.AVRecorderProfile = {\n         *   audioBitrate : 48000,\n         *   audioChannels : 2,\n         *   audioCodec : media.CodecMimeType.AUDIO_AAC,\n         *   audioSampleRate : 48000,\n         *   fileFormat : media.ContainerFormatType.CFT_MPEG_4,\n         *   videoBitrate : 2000000,\n         *   videoCodec : media.CodecMimeType.VIDEO_AVC,\n         *   videoFrameWidth : 640,\n         *   videoFrameHeight : 480,\n         *   videoFrameRate : 30\n         * }\n         * let avRecorderConfig: media.AVRecorderConfig = {\n         *   audioSourceType : media.AudioSourceType.AUDIO_SOURCE_TYPE_MIC,\n         *   videoSourceType : media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_YUV,\n         *   profile : avRecorderProfile,\n         *   url : 'fd://', // Before passing in an FD to this parameter, the file must be created by the caller and granted with the read and write permissions. Example value: fd://45.\n         *   rotation: 0, // The value can be 0, 90, 180, or 270. If any other value is used, prepare() reports an error.\n         *   location : { latitude : 30, longitude : 130 }\n         * }\n         *\n         * avRecorder.prepare(avRecorderConfig, (err: BusinessError) => {\n         *   if (err) {\n         *     console.error('Failed to prepare and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in preparing');\n         *   }\n         * })\n         */\n        prepare(config: AVRecorderConfig, callback: AsyncCallback<void>): void;\n        /**\n         * Prepares for recording.\n         * @permission ohos.permission.MICROPHONE\n         * @param { AVRecorderConfig } config - Recording parameters.\n         * @returns { Promise<void> } A Promise instance used to return when prepare completed.\n         * @throws { BusinessError } 201 - Permission denied. Return by promise.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Sets audio and video recording parameters. This API uses a promise to return the result.\n         * @permission ohos.permission.MICROPHONE\n         * This permission is required only if audio recording is involved.\n         * @param { AVRecorderConfig } config - Recording parameters.\n         * @returns { Promise<void> } A Promise instance used to return when prepare completed.\n         * @throws { BusinessError } 201 - Permission denied. Return by promise.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * // Configure the parameters based on those supported by the hardware device.\n         * let avRecorderProfile: media.AVRecorderProfile = {\n         *   audioBitrate : 48000,\n         *   audioChannels : 2,\n         *   audioCodec : media.CodecMimeType.AUDIO_AAC,\n         *   audioSampleRate : 48000,\n         *   fileFormat : media.ContainerFormatType.CFT_MPEG_4,\n         *   videoBitrate : 2000000,\n         *   videoCodec : media.CodecMimeType.VIDEO_AVC,\n         *   videoFrameWidth : 640,\n         *   videoFrameHeight : 480,\n         *   videoFrameRate : 30\n         * }\n         * let avRecorderConfig: media.AVRecorderConfig = {\n         *   audioSourceType : media.AudioSourceType.AUDIO_SOURCE_TYPE_MIC,\n         *   videoSourceType : media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_YUV,\n         *   profile : avRecorderProfile,\n         *   url : 'fd://', // Before passing in an FD to this parameter, the file must be created by the caller and granted with the read and write permissions. Example value: fd://45.\n         *   rotation: 0, // The value can be 0, 90, 180, or 270. If any other value is used, prepare() reports an error.\n         *   location : { latitude : 30, longitude : 130 }\n         * }\n         *\n         * avRecorder.prepare(avRecorderConfig).then(() => {\n         *   console.info('Succeeded in preparing');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to prepare and catch error is ' + err.message);\n         * });\n         */\n        prepare(config: AVRecorderConfig): Promise<void>;\n        /**\n         * Obtains the real-time configuration of this AVRecorder.\n         * This API uses an asynchronous callback to return the result.\n         * This API can be called only after prepare() is called.\n         * @param { AsyncCallback<AVRecorderConfig> } callback - Callback used to return the result.\n         * If the operation is successful, **err** is **undefined** and **data** is the real-time configuration obtained;\n         * otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * let avConfig: media.AVRecorderConfig;\n         *\n         * avRecorder.getAVRecorderConfig((err: BusinessError, config: media.AVRecorderConfig) => {\n         *   if (err) {\n         *     console.error('Failed to get avConfig and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in getting AVRecorderConfig');\n         *     avConfig = config;\n         *   }\n         * });\n         */\n        getAVRecorderConfig(callback: AsyncCallback<AVRecorderConfig>): void;\n        /**\n         * Obtains the real-time configuration of this AVRecorder. This API uses a promise to return the result.\n         * This API can be called only after prepare() is called.\n         * @returns { Promise<AVRecorderConfig> } Promise used to return the real-time configuration.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * let avConfig: media.AVRecorderConfig;\n         *\n         * avRecorder.getAVRecorderConfig().then((config: media.AVRecorderConfig) => {\n         *   console.info('Succeeded in getting AVRecorderConfig');\n         *   avConfig = config;\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to get AVRecorderConfig and catch error is ' + err.message);\n         * });\n         */\n        getAVRecorderConfig(): Promise<AVRecorderConfig>;\n        /**\n         * Obtains the surface required for recording. This API uses an asynchronous callback to return the result.\n         * The caller obtains the **surfaceBuffer** from this surface and fills in the corresponding video data.\n         *\n         * Note that the video data must carry the timestamp (in ns) and buffer size, and the start time of the timestamp\n         * must be based on the system startup time.\n         *\n         * This API can be called only after the prepare() API is called.\n         * @param { AsyncCallback<string> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined** and **data** is the surface ID obtained; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         * let surfaceID: string; // The surfaceID is transferred to the camera API to create a videoOutput instance.\n         *\n         * avRecorder.getInputSurface((err: BusinessError, surfaceId: string) => {\n         *   if (err) {\n         *     console.error('Failed to do getInputSurface and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in doing getInputSurface');\n         *     surfaceID = surfaceId;\n         *   }\n         * });\n         */\n        getInputSurface(callback: AsyncCallback<string>): void;\n        /**\n         * Obtains the surface required for recording. This API uses a promise to return the result.\n         * The caller obtains the **surfaceBuffer** from this surface and fills in the corresponding video data.\n         *\n         * Note that the video data must carry the timestamp (in ns) and buffer size, and the start time of the timestamp must be based on the system startup time.\n         *\n         * This API can be called only after the prepare() API is called.\n         * @returns { Promise<string> } Promise used to return the result.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         * let surfaceID: string; // The surfaceID is transferred to the camera API to create a videoOutput instance.\n         *\n         * avRecorder.getInputSurface().then((surfaceId: string) => {\n         *   console.info('Succeeded in getting InputSurface');\n         *   surfaceID = surfaceId;\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to get InputSurface and catch error is ' + err.message);\n         * });\n         */\n        getInputSurface(): Promise<string>;\n        /**\n         * Updates the video rotation angle. This API uses a promise to return the result.\n         *\n         * This API can be called only after the prepare() event is triggered and before the start() API is called.\n         * @param { number } rotation - Rotation angle, which can only be 0, 90, 180, or 270 degrees.\n         * @returns { Promise<void> } A Promise instance used to return when the function is finished.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * 2. Incorrect parameter types. 3.Parameter verification failed.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * let rotation = 90\n         *\n         * avRecorder.updateRotation(rotation).then(() => {\n         *   console.info('Succeeded in updateRotation');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to updateRotation and catch error is ' + err.message);\n         * });\n         */\n        updateRotation(rotation: number): Promise<void>;\n        /**\n         * Start AVRecorder, it will to started state.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when start completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Starts recording. This API uses an asynchronous callback to return the result.\n         *\n         * For audio-only recording, this API can be called only after the prepare() API is called.\n         * For video-only recording, this API can be called only after the getInputSurface() API is called.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.start((err: BusinessError) => {\n         *   if (err) {\n         *     console.error('Failed to start AVRecorder and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in starting AVRecorder');\n         *   }\n         * });\n         */\n        start(callback: AsyncCallback<void>): void;\n        /**\n         * Start AVRecorder, it will to started state.\n         * @returns { Promise<void> } A Promise instance used to return when start completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Starts recording. This API uses a promise to return the result.\n         *\n         * For audio-only recording, this API can be called only after the prepare() API is called.\n         * For video-only recording, this API can be called only after the getInputSurface() API is called.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.start().then(() => {\n         *   console.info('Succeeded in starting AVRecorder');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to start AVRecorder and catch error is ' + err.message);\n         * });\n         */\n        start(): Promise<void>;\n        /**\n         * Start AVRecorder, it will to paused state.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when pause completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Pauses recording. This API uses an asynchronous callback to return the result.\n         *\n         * This API can be called only after the start() API is called. You can call resume() to resume recording.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.pause((err: BusinessError) => {\n         *   if (err) {\n         *     console.error('Failed to pause AVRecorder and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in pausing');\n         *   }\n         * });\n         */\n        pause(callback: AsyncCallback<void>): void;\n        /**\n         * Start AVRecorder, it will to paused state.\n         * @returns { Promise<void> } A Promise instance used to return when pause completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Pauses recording. This API uses a promise to return the result.\n         *\n         * This API can be called only after the start()API is called. You can call resume() to resume recording.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.pause().then(() => {\n         *   console.info('Succeeded in pausing');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to pause AVRecorder and catch error is ' + err.message);\n         * });\n         */\n        pause(): Promise<void>;\n        /**\n         * Resume AVRecorder, it will to started state.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when resume completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Resumes recording. This API uses an asynchronous callback to return the result.\n         *\n         * This API can be called only after the pause() API is called.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.resume((err: BusinessError) => {\n         *   if (err) {\n         *     console.error('Failed to resume AVRecorder and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in resuming AVRecorder');\n         *   }\n         * });\n         */\n        resume(callback: AsyncCallback<void>): void;\n        /**\n         * Resume AVRecorder, it will to started state.\n         * @returns { Promise<void> } A Promise instance used to return when resume completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Resumes recording. This API uses a promise to return the result.\n         *\n         * This API can be called only after the pause() API is called.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.resume().then(() => {\n         *   console.info('Succeeded in resuming AVRecorder');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to resume  AVRecorder failed and catch error is ' + err.message);\n         * });\n         */\n        resume(): Promise<void>;\n        /**\n         * Stop AVRecorder, it will to stopped state.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when stop completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Stops recording. This API uses an asynchronous callback to return the result.\n         *\n         * This API can be called only after the start() or pause() API is called.\n         *\n         * For audio-only recording, you can call prepare() again for re-recording.\n         * For video-only recording or audio and video recording, you can call prepare() and getInputSurface() again for re-recording.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by callback.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.stop((err: BusinessError) => {\n         *   if (err) {\n         *     console.error('Failed to stop AVRecorder and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in stopping AVRecorder');\n         *   }\n         * });\n         */\n        stop(callback: AsyncCallback<void>): void;\n        /**\n         * Stop AVRecorder, it will to stopped state.\n         * @returns { Promise<void> } A Promise instance used to return when stop completed.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Stops recording. This API uses a promise to return the result.\n         *\n         * This API can be called only after the start() or pause() API is called.\n         *\n         * For audio-only recording, you can call prepare() again for re-recording.\n         * For video-only recording or audio and video recording,\n         * you can call prepare() getInputSurface() again for re-recording.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operate not permit. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.stop().then(() => {\n         *   console.info('Succeeded in stopping AVRecorder');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to stop AVRecorder and catch error is ' + err.message);\n         * });\n         */\n        stop(): Promise<void>;\n        /**\n         * Reset AVRecorder, it will to idle state.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when reset completed.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Resets audio and video recording. This API uses an asynchronous callback to return the result.\n         *\n         * For audio-only recording, you can call prepare() again for re-recording.\n         * For video-only recording or audio and video recording,\n         * you can call prepare() and getInputSurface() again for re-recording.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.reset((err: BusinessError) => {\n         *   if (err) {\n         *     console.error('Failed to reset AVRecorder and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in resetting AVRecorder');\n         *   }\n         * });\n         */\n        reset(callback: AsyncCallback<void>): void;\n        /**\n         * Reset AVRecorder, it will to idle state.\n         * @returns { Promise<void> } A Promise instance used to return when reset completed.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Resets audio and video recording. This API uses a promise to return the result.\n         *\n         * For audio-only recording, you can call prepare() again for re-recording.\n         * For video-only recording or audio and video recording,\n         * you can call prepare() and getInputSurface() again for re-recording.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.reset().then(() => {\n         *   console.info('Succeeded in resetting AVRecorder');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to reset and catch error is ' + err.message);\n         * });\n         */\n        reset(): Promise<void>;\n        /**\n         * Releases resources used for AVRecorder, it will to released state.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when release completed.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Releases the audio and video recording resources. This API uses an asynchronous callback to return the result.\n         *\n         * After the resources are released, you can no longer perform any operation on the **AVRecorder** instance.\n         * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined**; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.release((err: BusinessError) => {\n         *   if (err) {\n         *     console.error('Failed to release AVRecorder and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in releasing AVRecorder');\n         *   }\n         * });\n         */\n        release(callback: AsyncCallback<void>): void;\n        /**\n         * Releases resources used for AVRecorder, it will to released state.\n         * @returns { Promise<void> } A Promise instance used to return when release completed.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Releases the audio and video recording resources. This API uses a promise to return the result.\n         *\n         * After the resources are released, you can no longer perform any operation on the **AVRecorder** instance.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avRecorder.release().then(() => {\n         *   console.info('Succeeded in releasing AVRecorder');\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to release AVRecorder and catch error is ' + err.message);\n         * });\n         */\n        release(): Promise<void>;\n        /**\n         * Obtains the information about the current audio capturer.\n         * This API uses an asynchronous callback to return the result.\n         *\n         * This API can be called only after the **prepare()** API is called.\n         * If this API is called after **stop()** is successfully called, an error is reported.\n         * @param { AsyncCallback<audio.AudioCapturerChangeInfo> } callback - Callback used to return the result.\n         * If the operation is successful, **err** is **undefined** and **data** is the\n         * **audio.AudioCapturerChangeInfo** object obtained; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * import { audio } from '@kit.AudioKit';\n         *\n         * let currentCapturerInfo: audio.AudioCapturerChangeInfo;\n         *\n         * avRecorder.getCurrentAudioCapturerInfo((err: BusinessError, capturerInfo: audio.AudioCapturerChangeInfo) => {\n         *   if (err) {\n         *     console.error('Failed to get CurrentAudioCapturerInfo and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in getting CurrentAudioCapturerInfo');\n         *     currentCapturerInfo = capturerInfo;\n         *   }\n         * });\n         */\n        getCurrentAudioCapturerInfo(callback: AsyncCallback<audio.AudioCapturerChangeInfo>): void;\n        /**\n         * Obtains the information about the current audio capturer. This API uses a promise to return the result.\n         *\n         * This API can be called only after the **prepare()** API is called.\n         * If this API is called after **stop()** is successfully called, an error is reported.\n         * @returns { Promise<audio.AudioCapturerChangeInfo> } Promise used to return the audio capturer information.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * import { audio } from '@kit.AudioKit';\n         *\n         * let currentCapturerInfo: audio.AudioCapturerChangeInfo;\n         *\n         * avRecorder.getCurrentAudioCapturerInfo().then((capturerInfo: audio.AudioCapturerChangeInfo) => {\n         *   console.info('Succeeded in getting CurrentAudioCapturerInfo');\n         *   currentCapturerInfo = capturerInfo;\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to get CurrentAudioCapturerInfo and catch error is ' + err.message);\n         * });\n         */\n        getCurrentAudioCapturerInfo(): Promise<audio.AudioCapturerChangeInfo>;\n        /**\n         * Obtains the maximum amplitude of the current audio capturer.\n         * This API uses an asynchronous callback to return the result.\n         *\n         * This API can be called only after the **prepare()** API is called.\n         * If this API is called after **stop()** is successfully called, an error is reported.\n         *\n         * The return value is the maximum amplitude within the duration from the time the maximum amplitude\n         * is obtained last time to the current time. For example, if you have obtained the maximum amplitude at 1s\n         * and you call this API again at 2s, then the return value is the maximum amplitude\n         * within the duration from 1s to 2s.\n         * @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is successful,\n         * **err** is **undefined** and **data** is the maximum amplitude obtained; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * let maxAmplitude: number;\n         *\n         * avRecorder.getAudioCapturerMaxAmplitude((err: BusinessError, amplitude: number) => {\n         *   if (err) {\n         *     console.error('Failed to get AudioCapturerMaxAmplitude and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in getting AudioCapturerMaxAmplitude');\n         *     maxAmplitude = amplitude;\n         *   }\n         * });\n         */\n        getAudioCapturerMaxAmplitude(callback: AsyncCallback<number>): void;\n        /**\n         * Obtains the maximum amplitude of the current audio capturer. This API uses a promise to return the result.\n         *\n         * This API can be called only after the **prepare()** API is called.\n         * If this API is called after **stop()** is successfully called, an error is reported.\n         *\n         * The return value is the maximum amplitude within the duration from the time the maximum amplitude\n         * is obtained last time to the current time. For example, if you have obtained the maximum amplitude\n         * at 1s and you call this API again at 2s, then the return value is the maximum amplitude\n         * within the duration from 1s to 2s.\n         * @returns { Promise<number> } Promise used to return the maximum amplitude obtained.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * let maxAmplitude: number;\n         *\n         * avRecorder.getAudioCapturerMaxAmplitude().then((amplitude: number) => {\n         *   console.info('Succeeded in getting AudioCapturerMaxAmplitude');\n         *   maxAmplitude = amplitude;\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to get AudioCapturerMaxAmplitude and catch error is ' + err.message);\n         * });\n         */\n        getAudioCapturerMaxAmplitude(): Promise<number>;\n        /**\n         * Obtains available encoders. This API uses an asynchronous callback to return the result.\n         * @param { AsyncCallback<Array<EncoderInfo>> } callback - Callback used to return the result.\n         * If the operation is successful, **err** is **undefined** and **data** is the available encoders obtained; otherwise, **err** is an error object.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * let encoderInfo: media.EncoderInfo;\n         *\n         * avRecorder.getAvailableEncoder((err: BusinessError, info: media.EncoderInfo[]) => {\n         *   if (err) {\n         *     console.error('Failed to get AvailableEncoder and error is ' + err.message);\n         *   } else {\n         *     console.info('Succeeded in getting AvailableEncoder');\n         *     encoderInfo = info[0];\n         *   }\n         * });\n         */\n        getAvailableEncoder(callback: AsyncCallback<Array<EncoderInfo>>): void;\n        /**\n         * Obtains available encoders. This API uses an asynchronous callback to return the result.\n         * @returns { Promise<Array<EncoderInfo>> } Promise used to return the information about the available encoders.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         * @example\n         * let encoderInfo: media.EncoderInfo;\n         *\n         * avRecorder.getAvailableEncoder().then((info: media.EncoderInfo[]) => {\n         *   console.info('Succeeded in getting AvailableEncoder');\n         *   encoderInfo = info[0];\n         * }).catch((err: BusinessError) => {\n         *   console.error('Failed to get AvailableEncoder and catch error is ' + err.message);\n         * });\n         */\n        getAvailableEncoder(): Promise<Array<EncoderInfo>>;\n        /**\n         * Recorder state.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Enumerates the AVRecorder states. You can obtain the state through the **state** attribute.\n         * @type { AVRecorderState }\n         * @readonly\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        readonly state: AVRecorderState;\n        /**\n         * Subscribes to audio capturer configuration changes. Any configuration change triggers the callback that\n         * returns the entire configuration information.\n         *\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'audioCapturerChange' } type - Event type, which is **'audioCapturerChange'** in this case.\n         * @param { Callback<audio.AudioCapturerChangeInfo> } callback - Callback used to return the entire configuration\n         * information about the audio capturer.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * 2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        on(type: 'audioCapturerChange', callback: Callback<audio.AudioCapturerChangeInfo>): void;\n        /**\n         * Subscribes to media asset callback events. When FileGenerationMode is used during media file creation,\n         * the PhotoAsset object is called back to the application after the stop operation is complete.\n         *\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'photoAssetAvailable' } type - Event type, which is **'photoAssetAvailable'** in this case.\n         * The event is triggered when a photo asset is available.\n         * @param { Callback<photoAccessHelper.PhotoAsset> } callback - Callback used to return the\n         * **PhotoAsset** object corresponding to the resource file created by the system.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        on(type: 'photoAssetAvailable', callback: Callback<photoAccessHelper.PhotoAsset>): void;\n        /**\n         * Listens for recording stateChange events.\n         * @param { 'stateChange' } type - Type of the recording event to listen for.\n         * @param { function } callback - Callback used to listen for the recorder stateChange event.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Subscribes to AVRecorder state changes. An application can subscribe to only one AVRecorder state change event.\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'stateChange' } type - Event type, which is **'stateChange'** in this case.\n         * This event can be triggered by both user operations and the system.\n         * @param { OnAVRecorderStateChangeHandler } callback - Callback invoked when the event is triggered.\n         * @throws { BusinessError } 5400103 - IO error. Return by callback.\n         * @throws { BusinessError } 5400105 - Service died. Return by callback.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'stateChange', callback: OnAVRecorderStateChangeHandler): void;\n        /**\n         * Listens for recording error events.\n         * @param { 'error' } type - Type of the recording error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the recorder error event.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - The parameter check failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Listens for recording error events.\n         * @param { 'error' } type - Type of the recording error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the recorder error event.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - The parameter check failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @throws { BusinessError } 5400107 - Audio interrupted.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        /**\n         * Subscribes to AVRecorder errors. This event is used only for error prompt and does not require the user to\n         * stop recording control. If the AVRecorderState is also switched to error, call reset() or release()\n         * to exit the recording.\n         *\n         * An application can subscribe to only one AVRecorder error event.\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'error' } type - Event type, which is **'error'** in this case.\n         * This event is triggered when an error occurs during recording.\n         * @param { ErrorCallback } callback - Callback invoked when the event is triggered.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @throws { BusinessError } 5400107 - Audio interrupted.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        on(type: 'error', callback: ErrorCallback): void;\n        /**\n         * Cancel Listens for recording stateChange events.\n         * @param { 'stateChange' } type - Type of the recording stateChange event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Unsubscribes from AVRecorder state changes.\n         * @param { 'stateChange' } type - Event type, which is **'stateChange'** in this case.\n         * This event can be triggered by both user operations and the system.\n         * @param { OnAVRecorderStateChangeHandler } callback - Callback invoked when the event is triggered.\n         * This parameter is supported since API version 12.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'stateChange', callback?: OnAVRecorderStateChangeHandler): void;\n        /**\n         * Cancel Listens for recording error events.\n         * @param { 'error' } type - Type of the recording error event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Unsubscribes from AVRecorder errors. After the unsubscription,\n         * your application can no longer receive AVRecorder errors.\n         * @param { 'error' } type - Event type, which is **'error'** in this case.<br>This event is triggered when\n         * an error occurs during recording.\n         * @param { ErrorCallback } callback - Callback invoked when the event is triggered.\n         * This parameter is supported since API version 12.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        off(type: 'error', callback?: ErrorCallback): void;\n        /**\n         * Cancel Listens for recording audioCapturerChange events.\n         * @param { 'audioCapturerChange' } type - Type of the audioCapturerChange event to listen for.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        /**\n         * Subscribes to audio capturer configuration changes.\n         * @param { 'audioCapturerChange' } type - Event type, which is **'audioCapturerChange'** in this case.\n         * @param { Callback<audio.AudioCapturerChangeInfo> } callback - Callback used to return the entire configuration\n         * information about the audio capturer.\n         * This parameter is supported since API version 12.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        off(type: 'audioCapturerChange', callback?: Callback<audio.AudioCapturerChangeInfo>): void;\n        /**\n         * Unsubscribes from media asset callback events.\n         * @param { 'photoAssetAvailable' } type - Event type, which is **'photoAssetAvailable'** in this case.\n         * @param { Callback<photoAccessHelper.PhotoAsset> } callback - Callback used to return the **PhotoAsset** object\n         * corresponding to the resource file created by the system.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        off(type: 'photoAssetAvailable', callback?: Callback<photoAccessHelper.PhotoAsset>): void;\n    }\n    /**\n     * Enumerates audio encoding formats, it will be deprecated after API8, use @CodecMimeType to replace.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n     * @since 6\n     * @deprecated since 8\n     * @useinstead ohos.multimedia.media/media.CodecMimeType\n     */\n    enum AudioEncoder {\n        /**\n         * Default audio encoding format, which is AMR-NB.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        DEFAULT = 0,\n        /**\n         * Indicates the AMR-NB audio encoding format.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        AMR_NB = 1,\n        /**\n         * Indicates the AMR-WB audio encoding format.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        AMR_WB = 2,\n        /**\n         * Advanced Audio Coding Low Complexity (AAC-LC).\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        AAC_LC = 3,\n        /**\n         * High-Efficiency Advanced Audio Coding (HE-AAC).\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        HE_AAC = 4\n    }\n    /**\n     * Enumerates audio output formats, it will be deprecated after API8, use @ContainerFormatType to replace.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n     * @since 6\n     * @deprecated since 8\n     * @useinstead ohos.multimedia.media/media.ContainerFormatType\n     */\n    enum AudioOutputFormat {\n        /**\n         * Default audio output format, which is Moving Pictures Expert Group 4 (MPEG-4).\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        DEFAULT = 0,\n        /**\n         * Indicates the Moving Picture Experts Group-4 (MPEG4) media format.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        MPEG_4 = 2,\n        /**\n         * Indicates the Adaptive Multi-Rate Narrowband (AMR-NB) media format.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        AMR_NB = 3,\n        /**\n         * Indicates the Adaptive Multi-Rate Wideband (AMR-WB) media format.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        AMR_WB = 4,\n        /**\n         * Audio Data Transport Stream (ADTS), a transmission stream format of Advanced Audio Coding (AAC) audio.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         */\n        AAC_ADTS = 6\n    }\n    /**\n     * Provides the geographical location definitions for media resources.\n     *\n     * @typedef Location\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 6\n     */\n    /**\n     * Provides the geographical location definitions for media resources.\n     *\n     * @typedef Location\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @since 12\n     */\n    interface Location {\n        /**\n         * Latitude.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 6\n         */\n        /**\n         * Latitude.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        latitude: number;\n        /**\n         * Longitude.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 6\n         */\n        /**\n         * Longitude.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        longitude: number;\n    }\n    /**\n     * Provides the audio recorder configuration definitions.\n     *\n     * @typedef AudioRecorderConfig\n     * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n     * @since 6\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media.AVRecorderConfig\n     */\n    interface AudioRecorderConfig {\n        /**\n         * Audio encoding format. The default value is DEFAULT, it will be deprecated after API8.\n         * use \"audioEncoderMime\" instead.\n         * @type { ?AudioEncoder }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         * @useinstead ohos.multimedia.media/media.AudioRecorderConfig.audioEncoderMime\n         */\n        audioEncoder?: AudioEncoder;\n        /**\n         * Audio encoding bit rate.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         */\n        audioEncodeBitRate?: number;\n        /**\n         * Audio sampling rate.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         */\n        audioSampleRate?: number;\n        /**\n         * Number of audio channels.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         */\n        numberOfChannels?: number;\n        /**\n         * Audio output format. The default value is DEFAULT, it will be deprecated after API8.\n         * it will be replaced with \"fileFormat\".\n         * @type { ?AudioOutputFormat }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 8\n         * @useinstead ohos.multimedia.media/media.AudioRecorderConfig.fileFormat\n         */\n        format?: AudioOutputFormat;\n        /**\n         * Audio output uri.support two kind of uri now.\n         * format like: scheme + \"://\" + \"context\".\n         * file:  file://path\n         * fd:    fd://fd\n         * @type { string }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         */\n        uri: string;\n        /**\n         * Geographical location information.\n         * @type { ?Location }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         */\n        location?: Location;\n        /**\n         * audio encoding format MIME. it used to replace audioEncoder.\n         * @type { ?CodecMimeType }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 8\n         * @deprecated since 9\n         */\n        audioEncoderMime?: CodecMimeType;\n        /**\n         * output file format. see @ContainerFormatType , it used to replace \"format\".\n         * @type { ?ContainerFormatType }\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 8\n         * @deprecated since 9\n         */\n        fileFormat?: ContainerFormatType;\n    }\n    /**\n     * Manages and record audio. Before calling an AudioRecorder method, you must use createAudioRecorder()\n     * to create an AudioRecorder instance.\n     *\n     * @typedef AudioRecorder\n     * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n     * @since 6\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media.AVRecorder\n     */\n    interface AudioRecorder {\n        /**\n         * Prepares for recording.\n         * @permission ohos.permission.MICROPHONE\n         * @param { AudioRecorderConfig } config - Recording parameters.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#prepare\n         */\n        /**\n         * Prepares for recording.\n         * @permission ohos.permission.MICROPHONE\n         * @param { AudioRecorderConfig } config - Recording parameters.\n         * @throws { BusinessError } 201 - permission denied.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 12\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#prepare\n         */\n        prepare(config: AudioRecorderConfig): void;\n        /**\n         * Starts audio recording.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#start\n         */\n        start(): void;\n        /**\n         * Pauses audio recording.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#pause\n         */\n        pause(): void;\n        /**\n         * Resumes audio recording.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#resume\n         */\n        resume(): void;\n        /**\n         * Stops audio recording.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#stop\n         */\n        stop(): void;\n        /**\n         * Releases resources used for audio recording.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#release\n         */\n        release(): void;\n        /**\n         * Resets audio recording.\n         * Before resetting audio recording, you must call stop() to stop recording. After audio recording is reset,\n         * you must call prepare() to set the recording configurations for another recording.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#reset\n         */\n        reset(): void;\n        /**\n         * Listens for audio recording events.\n         * @param { 'prepare' | 'start' | 'pause' | 'resume' | 'stop' | 'release' | 'reset' } type - Type of the audio recording event to listen for.\n         * @param { function } callback - Callback used to listen for the audio recording event.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#on\n         */\n        on(type: 'prepare' | 'start' | 'pause' | 'resume' | 'stop' | 'release' | 'reset', callback: () => void): void;\n        /**\n         * Listens for audio recording error events.\n         * @param { 'error' } type - Type of the audio recording error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the audio recording error event.\n         * @syscap SystemCapability.Multimedia.Media.AudioRecorder\n         * @since 6\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVRecorder#on\n         */\n        on(type: 'error', callback: ErrorCallback): void;\n    }\n    /**\n     * Describes video playback states.\n     * @typedef { 'idle' | 'prepared' | 'playing' | 'paused' | 'stopped' | 'error' }\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media.AVPlayerState\n     */\n    type VideoPlayState = 'idle' | 'prepared' | 'playing' | 'paused' | 'stopped' | 'error';\n    /**\n     * Enumerates playback speed.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @since 8\n     */\n    /**\n     * Enumerates playback speed.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum PlaybackSpeed {\n        /**\n         * playback at 0.75x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         */\n        /**\n         * playback at 0.75x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_0_75_X = 0,\n        /**\n         * playback at normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         */\n        /**\n         * playback at normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_1_00_X = 1,\n        /**\n         * playback at 1.25x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         */\n        /**\n         * playback at 1.25x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_1_25_X = 2,\n        /**\n         * playback at 1.75x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         */\n        /**\n         * playback at 1.75x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_1_75_X = 3,\n        /**\n         * playback at 2.0x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         */\n        /**\n         * playback at 2.0x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_2_00_X = 4,\n        /**\n         * playback at 0.5x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_0_50_X = 5,\n        /**\n         * playback at 1.5x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_1_50_X = 6,\n        /**\n         * playback at 3.0x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @atomicservice\n         * @since 13\n         */\n        SPEED_FORWARD_3_00_X = 7,\n        /**\n         * playback at 0.25x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_0_25_X = 8,\n        /**\n         * playback at 0.125x normal speed\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @atomicservice\n         * @since 12\n         */\n        SPEED_FORWARD_0_125_X = 9\n    }\n    /**\n     * Manages and plays video. Before calling an video method, you must use createVideoPlayer() to create an VideoPlayer\n     * instance.\n     *\n     * @typedef VideoPlayer\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.multimedia.media/media.AVPlayer\n     */\n    interface VideoPlayer {\n        /**\n         * Set display surface.\n         * @param {string} surfaceId - surface id, video player will use this id get a surface instance.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when release output buffer completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#surfaceId\n         */\n        setDisplaySurface(surfaceId: string, callback: AsyncCallback<void>): void;\n        /**\n         * Set display surface.\n         * @param {string} surfaceId - surface id, video player will use this id get a surface instance.\n         * @returns { Promise<void> } A Promise instance used to return when release output buffer completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#surfaceId\n         */\n        setDisplaySurface(surfaceId: string): Promise<void>;\n        /**\n         * Prepare video playback, it will request resource for playing.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when prepare completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#prepare\n         */\n        prepare(callback: AsyncCallback<void>): void;\n        /**\n         * Prepare video playback, it will request resource for playing.\n         * @returns { Promise<void> } A Promise instance used to return when prepare completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#prepare\n         */\n        prepare(): Promise<void>;\n        /**\n         * Starts video playback.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when start completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#play\n         */\n        play(callback: AsyncCallback<void>): void;\n        /**\n         * Starts video playback.\n         * @returns { Promise<void> } A Promise instance used to return when start completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#play\n         */\n        play(): Promise<void>;\n        /**\n         * Pauses video playback.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when pause completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#pause\n         */\n        pause(callback: AsyncCallback<void>): void;\n        /**\n         * Pauses video playback.\n         * @returns { Promise<void> } A Promise instance used to return when pause completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#pause\n         */\n        pause(): Promise<void>;\n        /**\n         * Stops video playback.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when stop completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#stop\n         */\n        stop(callback: AsyncCallback<void>): void;\n        /**\n         * Stops video playback.\n         * @returns { Promise<void> } A Promise instance used to return when stop completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#stop\n         */\n        stop(): Promise<void>;\n        /**\n         * Resets video playback, it will release the resource.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when reset completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#reset\n         */\n        reset(callback: AsyncCallback<void>): void;\n        /**\n         * Resets video playback, it will release the resource.\n         * @returns { Promise<void> } A Promise instance used to return when reset completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#reset\n         */\n        reset(): Promise<void>;\n        /**\n         * Jumps to the specified playback position by default SeekMode(SEEK_PREV_SYNC),\n         * the performance may be not the best.\n         * @param { number } timeMs - Playback position to jump\n         * @param { AsyncCallback<number> } callback - A callback instance used to return when seek completed\n         * and return the seeking position result.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#seek\n         */\n        seek(timeMs: number, callback: AsyncCallback<number>): void;\n        /**\n         * Jumps to the specified playback position.\n         * @param { number } timeMs - Playback position to jump\n         * @param { SeekMode } mode - seek mode, see @SeekMode .\n         * @param { AsyncCallback<number> } callback - A callback instance used to return when seek completed\n         * and return the seeking position result.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#seek\n         */\n        seek(timeMs: number, mode: SeekMode, callback: AsyncCallback<number>): void;\n        /**\n         * Jumps to the specified playback position.\n         * @param { number } timeMs - Playback position to jump\n         * @param { SeekMode } mode - seek mode, see @SeekMode .\n         * @returns { Promise<number> } A Promise instance used to return when seek completed\n         * and return the seeking position result.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#seek\n         */\n        seek(timeMs: number, mode?: SeekMode): Promise<number>;\n        /**\n         * Sets the volume.\n         * @param { number } vol - Relative volume. The value ranges from 0.00 to 1.00. The value 1 indicates the maximum volume (100%).\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when set volume completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#setVolume\n         */\n        setVolume(vol: number, callback: AsyncCallback<void>): void;\n        /**\n         * Sets the volume.\n         * @param { number } vol - Relative volume. The value ranges from 0.00 to 1.00. The value 1 indicates the maximum volume (100%).\n         * @returns { Promise<void> } A Promise instance used to return when set volume completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#setVolume\n         */\n        setVolume(vol: number): Promise<void>;\n        /**\n         * Releases resources used for video playback.\n         * @param { AsyncCallback<void> } callback - A callback instance used to return when release completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#release\n         */\n        release(callback: AsyncCallback<void>): void;\n        /**\n         * Releases resources used for video playback.\n         * @returns { Promise<void> } A Promise instance used to return when release completed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#release\n         */\n        release(): Promise<void>;\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @param { AsyncCallback<Array<MediaDescription>> } callback - async callback return track info in MediaDescription.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#getTrackDescription\n         */\n        getTrackDescription(callback: AsyncCallback<Array<MediaDescription>>): void;\n        /**\n         * Get all track infos in MediaDescription, should be called after data loaded callback.\n         * @returns { Promise<Array<MediaDescription>> } A Promise instance used to return the track info in MediaDescription.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#getTrackDescription\n         */\n        getTrackDescription(): Promise<Array<MediaDescription>>;\n        /**\n         * media url. Mainstream video formats are supported.\n         * local:fd://XXX, file://XXX. network:http://xxx\n         * @type { string }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#url\n         */\n        url: string;\n        /**\n         * Video file descriptor. Mainstream video formats are supported.\n         * @type { AVFileDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 9\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#fdSrc\n         */\n        fdSrc: AVFileDescriptor;\n        /**\n         * Whether to loop video playback. The value true means to loop playback.\n         * @type { boolean }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#loop\n         */\n        loop: boolean;\n        /**\n         * Current playback position.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#currentTime\n         */\n        readonly currentTime: number;\n        /**\n         * Playback duration, if -1 means cannot seek.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#duration\n         */\n        readonly duration: number;\n        /**\n         * Playback state.\n         * @type { VideoPlayState }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#state\n         */\n        readonly state: VideoPlayState;\n        /**\n         * video width, valid after prepared.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#width\n         */\n        readonly width: number;\n        /**\n         * video height, valid after prepared.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#height\n         */\n        readonly height: number;\n        /**\n         * Describes audio interrupt mode, refer to {@link #audio.InterruptMode}. If it is not\n         * set, the default mode will be used. Set it before calling the {@link #play()} in the\n         * first time in order for the interrupt mode to become effective thereafter.\n         * @type { ?audio.InterruptMode }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 9\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#audioInterruptMode\n         */\n        audioInterruptMode?: audio.InterruptMode;\n        /**\n         * video scale type. By default, the {@link #VIDEO_SCALE_TYPE_FIT} will be used, for more\n         * information, refer to {@link #VideoScaleType}\n         * @type { ?VideoScaleType }\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 9\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#videoScaleType\n         */\n        videoScaleType?: VideoScaleType;\n        /**\n         * set payback speed.\n         * @param { number } speed - playback speed, see @PlaybackSpeed .\n         * @param { AsyncCallback<number> } callback Callback used to return actually speed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#setSpeed\n         */\n        setSpeed(speed: number, callback: AsyncCallback<number>): void;\n        /**\n         * set output surface.\n         * @param { number } speed - playback speed, see @PlaybackSpeed .\n         * @returns { Promise<number> } A Promise instance used to return actually speed.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#setSpeed\n         */\n        setSpeed(speed: number): Promise<number>;\n        /**\n         * Listens for video playback completed events.\n         * @param { 'playbackCompleted' } type - Type of the playback event to listen for.\n         * @param { Callback<void> } callback - Callback used to listen for the playback event return.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:stateChange\n         */\n        on(type: 'playbackCompleted', callback: Callback<void>): void;\n        /**\n         * Listens for video playback buffering events.\n         * @param { 'bufferingUpdate' } type - Type of the playback buffering update event to listen for.\n         * @param { function } callback - Callback used to listen for the buffering update event,\n         * return BufferingInfoType and the value.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:bufferingUpdate\n         */\n        on(type: 'bufferingUpdate', callback: (infoType: BufferingInfoType, value: number) => void): void;\n        /**\n         * Listens for start render video frame events.\n         * @param { 'startRenderFrame' } type - Type of the playback event to listen for.\n         * @param { Callback<void> } callback - Callback used to listen for the playback event return.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:startRenderFrame\n         */\n        on(type: 'startRenderFrame', callback: Callback<void>): void;\n        /**\n         * Listens for video size changed event.\n         * @param { 'videoSizeChanged' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback event return video size.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:videoSizeChange\n         */\n        on(type: 'videoSizeChanged', callback: (width: number, height: number) => void): void;\n        /**\n         * Listens for audio interrupt event, refer to {@link #audio.InterruptEvent}\n         * @param { 'audioInterrupt' } type - Type of the playback event to listen for.\n         * @param { function } callback - Callback used to listen for the playback event return audio interrupt info.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 9\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:audioInterrupt\n         */\n        on(type: 'audioInterrupt', callback: (info: audio.InterruptEvent) => void): void;\n        /**\n         * Listens for playback error events.\n         * @param { 'error' } type - Type of the playback error event to listen for.\n         * @param { ErrorCallback } callback - Callback used to listen for the playback error event.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 8\n         * @deprecated since 9\n         * @useinstead ohos.multimedia.media/media.AVPlayer#event:error\n         */\n        on(type: 'error', callback: ErrorCallback): void;\n    }\n    /**\n     * Enumerates video scale type.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @since 9\n     */\n    /**\n     * Enumerates video scale type.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum VideoScaleType {\n        /**\n         * The content is stretched to the fit the display surface rendering area. When\n         * the aspect ratio of the content is not same as the display surface, the aspect\n         * of the content is not maintained. This is the default scale type.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 9\n         */\n        /**\n         * The content is stretched to the fit the display surface rendering area. When\n         * the aspect ratio of the content is not same as the display surface, the aspect\n         * of the content is not maintained. This is the default scale type.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        VIDEO_SCALE_TYPE_FIT = 0,\n        /**\n         * The content is stretched to the fit the display surface rendering area. When\n         * the aspect ratio of the content is not the same as the display surface, content's\n         * aspect ratio is maintained and the content is cropped to fit the display surface.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @since 9\n         */\n        /**\n         * The content is stretched to the fit the display surface rendering area. When\n         * the aspect ratio of the content is not the same as the display surface, content's\n         * aspect ratio is maintained and the content is cropped to fit the display surface.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        VIDEO_SCALE_TYPE_FIT_CROP = 1,\n        /**\n         * The content is scaled proportionally to fit the display area.\n         * If the aspect ratios of the two are inconsistent, the short side will be centered.\n         * @syscap SystemCapability.Multimedia.Media.VideoPlayer\n         * @crossplatform\n         * @atomicservice\n         * @since 20\n         */\n        VIDEO_SCALE_TYPE_SCALED_ASPECT = 2\n    }\n    /**\n     * Enumerates container format type(The abbreviation for 'container format type' is CFT).\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     */\n    /**\n     * Enumerates container format type(The abbreviation for 'container format type' is CFT).\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum ContainerFormatType {\n        /**\n         * A video container format type mp4.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * A video container format type mp4.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        CFT_MPEG_4 = 'mp4',\n        /**\n         * A audio container format type m4a.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * A audio container format type m4a.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        CFT_MPEG_4A = 'm4a',\n        /**\n         * A audio container format type mp3.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        CFT_MP3 = 'mp3',\n        /**\n         * A audio container format type wav.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        CFT_WAV = 'wav',\n        /**\n         * A audio container format type amr.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 18\n         */\n        CFT_AMR = 'amr',\n        /**\n         * A audio container format type aac with ADTS.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 20\n         */\n        CFT_AAC = 'aac'\n    }\n    /**\n     * Enumerates media data type.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     */\n    /**\n     * Enumerates media data type.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Enumerates media data type.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum MediaType {\n        /**\n         * track is audio.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * track is audio.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * track is audio.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MEDIA_TYPE_AUD = 0,\n        /**\n         * track is video.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * track is video.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * track is video.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MEDIA_TYPE_VID = 1,\n        /**\n         * Track is subtitle.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        MEDIA_TYPE_SUBTITLE = 2\n    }\n    /**\n     * Enumerates media description key.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     */\n    /**\n     * Enumerates media description key.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Enumerates media description key.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum MediaDescriptionKey {\n        /**\n         * key for track index, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for track index, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for track index, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_TRACK_INDEX = 'track_index',\n        /**\n         * key for track type, value type is number, see @MediaType.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for track type, value type is number, see @MediaType.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for track type, value type is number, see @MediaType.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_TRACK_TYPE = 'track_type',\n        /**\n         * key for codec mime type, value type is string.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for codec mime type, value type is string.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for codec mime type, value type is string.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_CODEC_MIME = 'codec_mime',\n        /**\n         * key for duration, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for duration, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for duration, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_DURATION = 'duration',\n        /**\n         * key for bitrate, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for bitrate, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for bitrate, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_BITRATE = 'bitrate',\n        /**\n         * key for video width, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for video width, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for video width, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_WIDTH = 'width',\n        /**\n         * key for video height, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for video height, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for video height, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_HEIGHT = 'height',\n        /**\n         * key for video frame rate, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for video frame rate, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for video frame rate, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_FRAME_RATE = 'frame_rate',\n        /**\n         * key for audio channel count, value type is number\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for audio channel count, value type is number\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for audio channel count, value type is number\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_AUD_CHANNEL_COUNT = 'channel_count',\n        /**\n         * key for audio sample rate, value type is number\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key for audio sample rate, value type is number\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key for audio sample rate, value type is number\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_AUD_SAMPLE_RATE = 'sample_rate',\n        /**\n         * key for audio bit depth, value type is number\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_AUD_SAMPLE_DEPTH = 'sample_depth',\n        /**\n         * Key for language.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_LANGUAGE = 'language',\n        /**\n         * Key for track name, value is string.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_TRACK_NAME = 'track_name',\n        /**\n         * Key for video hdr type, value type is number.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        MD_KEY_HDR_TYPE = 'hdr_type'\n    }\n    /**\n     * Enumerates audio source type for recorder.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Enumerates the audio source types for video recording.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum AudioSourceType {\n        /**\n         * Default audio source type.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Default audio input source.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        AUDIO_SOURCE_TYPE_DEFAULT = 0,\n        /**\n         * Source type mic.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         *  Microphone audio input source.\n         *  <br>**Atomic service API**: This API can be used in atomic services since API version 12.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AUDIO_SOURCE_TYPE_MIC = 1,\n        /**\n         * Audio source in speech recognition scenarios.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        AUDIO_SOURCE_TYPE_VOICE_RECOGNITION = 2,\n        /**\n         * Voice communication source.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        AUDIO_SOURCE_TYPE_VOICE_COMMUNICATION = 7,\n        /**\n         * Voice message source.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        AUDIO_SOURCE_TYPE_VOICE_MESSAGE = 10,\n        /**\n         * Audio source in camera recording scenarios.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        AUDIO_SOURCE_TYPE_CAMCORDER = 13\n    }\n    /**\n     * Enumerates video source type for recorder.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Enumerates the video source types for video recording.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @since 12\n     */\n    enum VideoSourceType {\n        /**\n         * Surface raw data.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * The input surface carries raw data.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_SOURCE_TYPE_SURFACE_YUV = 0,\n        /**\n         * Surface ES data.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * The input surface carries ES data.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_SOURCE_TYPE_SURFACE_ES = 1\n    }\n    /**\n     * Enumerates the modes for creating media files.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 12\n     */\n    enum FileGenerationMode {\n        /**\n         * The application creates a media file in the sandbox.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        APP_CREATE = 0,\n        /**\n         * The system creates a media file. Currently, this mode takes effect only in camera recording scenarios.\n         * The URL set by the application is ignored.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        AUTO_CREATE_CAMERA_SCENE = 1\n    }\n    /**\n     * Describes the information about an encoder.\n     *\n     * @typedef EncoderInfo\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 11\n     */\n    interface EncoderInfo {\n        /**\n         * MIME type of the encoder.\n         * @type { CodecMimeType }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        mimeType: CodecMimeType;\n        /**\n         * Encoder type. The value **audio** means an audio encoder, and **video** means a video encoder.\n         * @type { string }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        type: string;\n        /**\n         * Bit rate range of the encoder, with the minimum and maximum bit rates specified.\n         * @type { ?Range }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        bitRate?: Range;\n        /**\n         * Video frame rate range, with the minimum and maximum frame rates specified.\n         * This parameter is available only for video encoders.\n         * @type { ?Range }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        frameRate?: Range;\n        /**\n         * Video frame width range, with the minimum and maximum widths specified.\n         * This parameter is available only for video encoders.\n         * @type { ?Range }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        width?: Range;\n        /**\n         * Video frame height range, with the minimum and maximum heights specified.\n         * This parameter is available only for video encoders.\n         * @type { ?Range }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        height?: Range;\n        /**\n         * Number of audio channels for the audio capturer, with the minimum and maximum numbers of audio channels specified.\n         * This parameter is available only for audio encoders.\n         * @type { ?Range }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        channels?: Range;\n        /**\n         * Audio sampling rate, including all available audio sampling rates. The value depends on the encoder type,\n         * and this parameter is available only for audio encoders.\n         * @type { ?Array<number> }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        sampleRate?: Array<number>;\n    }\n    /**\n     * Provides Range with lower and upper limit.\n     *\n     * @typedef Range\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 11\n     */\n    interface Range {\n        /**\n         * Minimum value.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        min: number;\n        /**\n         * Maximum value.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        max: number;\n    }\n    /**\n     * Provides the media recorder profile definitions.\n     *\n     * @typedef AVRecorderProfile\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Describes the audio and video recording profile.\n     *\n     * @typedef AVRecorderProfile\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    interface AVRecorderProfile {\n        /**\n         * Indicates the audio bitrate.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Audio encoding bit rate. This parameter is mandatory for audio recording.<br>Supported bit rate ranges:\n         * <br>- Range [32000 - 500000] for the AAC encoding format.<br>- Range [64000] for the G.711 μ-law encoding format.\n         * <br>- Range [8000, 16000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000,\n         * 224000, 256000, 320000] for the MP3 encoding format.<br>When the MP3 encoding format is used,\n         * the mapping between the sampling rate and bit rate is as follows:<br>- When the sampling rate is lower than\n         * 16 kHZ, the bit rate range is [8000 - 64000].<br>- When the sampling rate ranges from 16 kHz to 32 kHz,\n         * the bit rate range is [8000 - 160000].<br>- When the sampling rate is greater than 32 kHz, the bit rate range\n         * is [32000 - 320000].<br>- Range [4750, 5150, 5900, 6700, 7400, 7950, 10200, 12200] for\n         * the AMR-NB encoding format.<br>- Range [6600, 8850, 12650, 14250, 15850, 18250, 19850, 23050, 23850] for the\n         * AMR-WB encoding format.<br>**Atomic service API**: This API can be used in atomic services since API version 12.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        audioBitrate?: number;\n        /**\n         * Indicates the number of audio channels.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Number of audio channels. This parameter is mandatory for audio recording.<br>- Range [1 - 8] for the\n         * AAC encoding format.<br>- Range [1] for the G.711 μ-law encoding format.<br>- Range [1 - 2] for the MP3 encoding\n         * format.<br>- Range [1] for the AMR-NB and AMR-WB encoding formats.<br>**Atomic service API**: This API can be\n         * used in atomic services since API version 12.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        audioChannels?: number;\n        /**\n         * Indicates the audio encoding format.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Audio encoding format. This parameter is mandatory for audio recording. Currently, AUDIO_AAC, AUDIO_MP3,\n         * AUDIO_G711MU, AUDIO_AMR_NB, and AUDIO_AMR_WB are supported.<br>**Atomic service API**: This API can be used in\n         * atomic services since API version 12.\n         * @type { ?CodecMimeType }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        audioCodec?: CodecMimeType;\n        /**\n         * Indicates the audio sampling rate.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Audio sampling rate. This parameter is mandatory for audio recording.<br>Supported sampling rate ranges:\n         * <br>- Range [8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000] for the AAC\n         * encoding format.<br>- Range [8000] for the G.711 μ-law encoding format.<br>- Range [8000, 11025, 12000, 16000,\n         * 22050, 24000, 32000, 44100, 48000] for the MP3 encoding format.<br>- Range [8000] for the AMR-NB encoding format.\n         * <br>- Range [16000] for the AMR-WB encoding format.<br>Variable bit rate. The bit rate is for reference only.\n         * <br>**Atomic service API**: This API can be used in atomic services since API version 12.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        audioSampleRate?: number;\n        /**\n         * Indicates the output file format.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Container format of a file. This parameter is mandatory. Currently, the MP4, M4A, MP3, WAV, and AMR container\n         * formats are supported. The AUDIO_MP3 encoding format cannot be used in the MP4 container format.<br>**Atomic\n         * service API**: This API can be used in atomic services since API version 12.\n         * @type { ContainerFormatType }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        fileFormat: ContainerFormatType;\n        /**\n         * Indicates the video bitrate.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Video encoding bit rate. This parameter is mandatory for video recording. The value range is [10000 - 100000000].\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        videoBitrate?: number;\n        /**\n         * Indicates the video encoding format.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Video encoding format. This parameter is mandatory for video recording. Currently, VIDEO_AVC is supported.\n         * @type { ?CodecMimeType }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        videoCodec?: CodecMimeType;\n        /**\n         * Indicates the video width.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Width of a video frame. This parameter is mandatory for video recording. The value range is [176 - 4096].\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        videoFrameWidth?: number;\n        /**\n         * Indicates the video height.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Height of a video frame. This parameter is mandatory for video recording. The value range is [144 - 4096].\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        videoFrameHeight?: number;\n        /**\n         * Indicates the video frame rate.\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Video frame rate. This parameter is mandatory for video recording. The value range is [1 - 60].\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        videoFrameRate?: number;\n        /**\n         * Whether to record HDR video.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 11\n         */\n        /**\n         * HDR encoding. This parameter is optional for video recording. The default value is **false**, and there is no\n         * requirement on the encoding format. When **isHdr** is set to **true**, the encoding format must be **video/hevc**.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        isHdr?: boolean;\n        /**\n         * Whether temporal layered encoding is supported. This parameter is optional for video recording. The default value\n         * is **false**. If this parameter is set to **true**, some frames in the video output streams can be skipped\n         * without being encoded.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        enableTemporalScale?: boolean;\n    }\n    /**\n     * Provides the media recorder configuration definitions.\n     *\n     * @typedef AVRecorderConfig\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @since 9\n     */\n    /**\n     * Describes the audio and video recording parameters.\n     *\n     * The **audioSourceType** and **videoSourceType** parameters are used to distinguish audio-only recording,\n     * video-only recording, and audio and video recording. For audio-only recording, set only **audioSourceType**.\n     * For video-only recording, set only **videoSourceType**. For audio and video recording, set both **audioSourceType**\n     * and **videoSourceType**.\n     *\n     * @typedef AVRecorderConfig\n     * @syscap SystemCapability.Multimedia.Media.AVRecorder\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    interface AVRecorderConfig {\n        /**\n         * Audio source type, details see @AudioSourceType .\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Type of the audio source to record. This parameter is mandatory for audio recording.<br>**Atomic service API**:\n         * This API can be used in atomic services since API version 12.\n         * @type { ?AudioSourceType }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        audioSourceType?: AudioSourceType;\n        /**\n         * Video source type, details see @VideoSourceType .\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Type of the video source to record. This parameter is mandatory for video recording.\n         * @type { ?VideoSourceType }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @since 12\n         */\n        videoSourceType?: VideoSourceType;\n        /**\n         * Video recorder profile, details see @AVRecorderProfile .\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Recording profile. This parameter is mandatory.<br>**Atomic service API**: This API can be used in atomic\n         * services since API version 12.\n         * @type { AVRecorderProfile }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        profile: AVRecorderProfile;\n        /**\n         * File output uri, support a kind of uri now.\n         * format like: \"fd://\" + \"context\".\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         */\n        /**\n         * Recording output URL: fd://xx (fd number).<br>This parameter is mandatory.<br>**Atomic service API**:\n         * This API can be used in atomic services since API version 12.\n         * @type { string }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        url: string;\n        /**\n         * Mode for creating the file, which is used together with on('photoAssetAvailable').\n         * @type { ?FileGenerationMode }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        fileGenerationMode?: FileGenerationMode;\n        /**\n         * Rotation angle of the recorded video. The value can be 0 (default), 90, 180, or 270 for MP4 videos.<br>This API\n         * is supported since API version 6 and deprecated since API version 12. You are advised to use\n         * **AVMetadata.videoOrientation** instead. If both parameters are set, **AVMetadata.videoOrientation** is used.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         * @deprecated since 12\n         * @useinstead ohos.multimedia.media/media.AVMetadata#videoOrientation\n         */\n        rotation?: number;\n        /**\n         * Geographical location of the recorded video. By default, the geographical location information is not recorded.\n         * <br>This API is supported since API version 6 and deprecated since API version 12. You are advised to use\n         * **AVMetadata.location** instead. If both parameters are set, **AVMetadata.location** is used.\n         * @type { ?Location }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 9\n         * @deprecated since 12\n         * @useinstead ohos.multimedia.media/media.AVMetadata#location\n         */\n        location?: Location;\n        /**\n         * Metadata. For details, see @AVMetadata.\n         * @type { ?AVMetadata }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 12\n         */\n        metadata?: AVMetadata;\n        /**\n         * Maximum recording duration, in seconds. The value range is [1, 2^31-1]. If an invalid value is provided,\n         * it is reset to the maximum allowed duration. Once the recording reaches the specified duration,\n         * it stops automatically and notifies via the **stateChange** callback that the recording has stopped:\n         * AVRecorderState = 'stopped', StateChangeReason = BACKGROUND.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVRecorder\n         * @since 18\n         */\n        maxDuration?: number;\n    }\n    /**\n     * Provides the container definition for media description key-value pairs.\n     *\n     * @typedef MediaDescription\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     */\n    /**\n     * Provides the container definition for media description key-value pairs.\n     *\n     * @typedef MediaDescription\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Provides the container definition for media description key-value pairs.\n     *\n     * @typedef MediaDescription\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    interface MediaDescription {\n        /**\n         * key:value pair, key see @MediaDescriptionKey .\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * key:value pair, key see @MediaDescriptionKey .\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * key:value pair, key see @MediaDescriptionKey .\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        [key: string]: Object;\n    }\n    /**\n     * Enumerates seek mode.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     */\n    /**\n     * Enumerates seek mode.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Enumerates seek mode.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum SeekMode {\n        /**\n         * seek to the next sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * seek to the next sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * seek to the next sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SEEK_NEXT_SYNC = 0,\n        /**\n         * seek to the previous sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * seek to the previous sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * seek to the previous sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SEEK_PREV_SYNC = 1,\n        /**\n         * Seek to the closest frame of the given timestamp.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        SEEK_CLOSEST = 2,\n        /**\n         * Seek in continuous mode.\n         * Seek continuous can provide a smoother dragging experience, but the device needs to support\n         * the current stream to execute seek continuous. Before calling seek continuous,\n         * check whether it is supported, see {@link #isSeekContinuousSupported}.\n         * If an unsupported scenario occurs, seek continuous will report an error({@link #AVERR_SEEK_CONTINUOUS_UNSUPPORTED})\n         * through the on error callback.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 18\n         */\n        SEEK_CONTINUOUS = 3\n    }\n    /**\n     * Enumerates switch mode.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum SwitchMode {\n        /**\n         * switch to the next sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SMOOTH = 0,\n        /**\n         * switch to the previous sync frame of the given timestamp\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        SEGMENT = 1,\n        /**\n         * switch to the closest frame of the given timestamp.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @atomicservice\n         * @since 12\n         */\n        CLOSEST = 2\n    }\n    /**\n     * Enumerates Codec MIME types.\n     *\n     * @enum { string }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @since 8\n     */\n    /**\n     * Enumerates Codec MIME types.\n     *\n     * @enum { string }\n     * @syscap SystemCapability.Multimedia.Media.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    enum CodecMimeType {\n        /**\n         * H.263 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * H.263 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_H263 = 'video/h263',\n        /**\n         * H.264 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * H.264 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_AVC = 'video/avc',\n        /**\n         * MPEG2 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * MPEG2 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_MPEG2 = 'video/mpeg2',\n        /**\n         * MPEG4 codec MIME type\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * MPEG4 codec MIME type\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_MPEG4 = 'video/mp4v-es',\n        /**\n         * VP8 codec MIME type\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * VP8 codec MIME type\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_VP8 = 'video/x-vnd.on2.vp8',\n        /**\n         * AAC codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * AAC codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        AUDIO_AAC = 'audio/mp4a-latm',\n        /**\n         * vorbis codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * vorbis codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        AUDIO_VORBIS = 'audio/vorbis',\n        /**\n         * flac codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 8\n         */\n        /**\n         * flac codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        AUDIO_FLAC = 'audio/flac',\n        /**\n         * H.265 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 11\n         */\n        /**\n         * H.265 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @crossplatform\n         * @since 12\n         */\n        VIDEO_HEVC = 'video/hevc',\n        /**\n         * mp3 codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        AUDIO_MP3 = 'audio/mpeg',\n        /**\n         * G711-mulaw codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 12\n         */\n        AUDIO_G711MU = 'audio/g711mu',\n        /**\n         * AMR_NB codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 18\n         */\n        AUDIO_AMR_NB = 'audio/3gpp',\n        /**\n         * AMR_WB codec MIME type.\n         * @syscap SystemCapability.Multimedia.Media.Core\n         * @since 18\n         */\n        AUDIO_AMR_WB = 'audio/amr-wb'\n    }\n    /**\n     *  Enumerates the encoding and container formats used during screen capture.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n     * @since 12\n     */\n    enum AVScreenCaptureRecordPreset {\n        /**\n         * The H.264 video encoding format, AAC audio encoding format, and MP4 container format are used.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREEN_RECORD_PRESET_H264_AAC_MP4 = 0,\n        /**\n         * The H.265 video encoding format, AAC audio encoding format, and MP4 container format are used.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREEN_RECORD_PRESET_H265_AAC_MP4 = 1\n    }\n    /**\n     *  Enumerates the video fill modes during screen capture.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n     * @since 18\n     */\n    enum AVScreenCaptureFillMode {\n        /**\n         * Keeps the original aspect ratio, matching the aspect ratio of the physical screen.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 18\n         */\n        PRESERVE_ASPECT_RATIO = 0,\n        /**\n         * Stretches the image to fit the specified dimensions.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 18\n         */\n        SCALE_TO_FILL = 1\n    }\n    /**\n     *  Enumerates the screen capture states used in callbacks.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n     * @since 12\n     */\n    enum AVScreenCaptureStateCode {\n        /**\n         * Screen capture is started.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_STARTED = 0,\n        /**\n         * Screen capture is canceled.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_CANCELED = 1,\n        /**\n         * Screen capture is manually stopped by the user.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_STOPPED_BY_USER = 2,\n        /**\n         * Screen capture is interrupted by another screen capture.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_INTERRUPTED_BY_OTHER = 3,\n        /**\n         * Screen capture is interrupted by an incoming call.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_STOPPED_BY_CALL = 4,\n        /**\n         * The microphone is unavailable during screen capture.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_MIC_UNAVAILABLE = 5,\n        /**\n         * The microphone is muted by the user.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_MIC_MUTED_BY_USER = 6,\n        /**\n         * The microphone is unmuted by the user.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_MIC_UNMUTED_BY_USER = 7,\n        /**\n         * The system enters a privacy page during screen capture.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_ENTER_PRIVATE_SCENE = 8,\n        /**\n         * The system exits a privacy page during screen capture.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_EXIT_PRIVATE_SCENE = 9,\n        /**\n         * Screen capture is interrupted by system user switchover.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        SCREENCAPTURE_STATE_STOPPED_BY_USER_SWITCHES = 10\n    }\n    /**\n     * Provides the media AVScreenCaptureStrategy definition.\n     *\n     * @typedef AVScreenCaptureStrategy\n     * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n     * @since 20\n     */\n    interface AVScreenCaptureStrategy {\n        /**\n         * Allows starting or maintaining screen capture during a call\n         * @type { ?boolean } The default value is false,\n         * which means that the recording is ended during the call or the recording cannot be initiated.\n         * @default {false} [Required if provided]\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 20\n         */\n        keepCaptureDuringCall?: boolean;\n    }\n    /**\n     * Defines the screen capture parameters.\n     *\n     * @typedef AVScreenCaptureRecordConfig\n     * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n     * @since 12\n     */\n    interface AVScreenCaptureRecordConfig {\n        /**\n         * FD of the file output.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        fd: number;\n        /**\n         * Video width, in px. The default value varies according to the display in use.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        frameWidth?: number;\n        /**\n         * Video height, in px. The default value varies according to the display in use.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        frameHeight?: number;\n        /**\n         * Video bit rate. The default value is **10000000**.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        videoBitrate?: number;\n        /**\n         * Audio sampling rate. This value is used for both internal capture and external capture (using microphones).\n         * Only **48000** (default value) and **16000** are supported.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        audioSampleRate?: number;\n        /**\n         * Number of audio channels. This value is used for both internal capture and external capture (using microphones).\n         * Only **1** and **2** (default) are supported.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        audioChannelCount?: number;\n        /**\n         * Audio bit rate. This value is used for both internal capture and external capture (using microphones).\n         * The default value is **96000**.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        audioBitrate?: number;\n        /**\n         * Encoding and container format used. The default value is **SCREEN_RECORD_PRESET_H264_AAC_MP4**.\n         * @type { ?AVScreenCaptureRecordPreset }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         */\n        preset?: AVScreenCaptureRecordPreset;\n        /**\n         * ID of the display used for screen capture. By default, the main screen is captured.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 15\n         */\n        displayId?: number;\n        /**\n         * Video fill mode during screen capture.\n         * @type { ?AVScreenCaptureFillMode }\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 18\n         */\n        fillMode?: AVScreenCaptureFillMode;\n        /**\n         * Screen Capture Policy Configuration Fields\n         * @type { ?AVScreenCaptureStrategy } Screen capture policy configuration values\n         * @default {default value of the property} [Required if provided]\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 20\n         */\n        strategy?: AVScreenCaptureStrategy;\n    }\n    /**\n     * Provides APIs to manage screen capture. Before calling any API in **AVScreenCaptureRecorder**,\n     * you must use createAVScreenCaptureRecorder() to create an **AVScreenCaptureRecorder** instance.\n     *\n     * @typedef AVScreenCaptureRecorder\n     * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n     * @since 12\n     */\n    interface AVScreenCaptureRecorder {\n        /**\n         * Initializes screen capture and sets screen capture parameters. This API uses a promise to return the result.\n         * @param { AVScreenCaptureRecordConfig } config - Screen capture parameters to set.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3. Parameter verification failed. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * let avCaptureConfig: media.AVScreenCaptureRecordConfig = {\n         *     fd: 0, // Before passing in an FD to this parameter, the file must be created by the caller and granted with the write permissions.\n         *     frameWidth: 640,\n         *     frameHeight: 480\n         *     // Add other parameters.\n         * }\n         *\n         * avScreenCaptureRecorder.init(avCaptureConfig).then(() => {\n         *     console.info('Succeeded in initing avScreenCaptureRecorder');\n         * }).catch((err: BusinessError) => {\n         *     console.info('Failed to init avScreenCaptureRecorder, error: ' + err.message);\n         * })\n         */\n        init(config: AVScreenCaptureRecordConfig): Promise<void>;\n        /**\n         * Starts screen capture. This API uses a promise to return the result.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avScreenCaptureRecorder.startRecording().then(() => {\n         *     console.info('Succeeded in starting avScreenCaptureRecorder');\n         * }).catch((err: BusinessError) => {\n         *     console.info('Failed to start avScreenCaptureRecorder, error: ' + err.message);\n         * })\n         */\n        startRecording(): Promise<void>;\n        /**\n         * Stops screen capture. This API uses a promise to return the result.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avScreenCaptureRecorder.stopRecording().then(() => {\n         *     console.info('Succeeded in stopping avScreenCaptureRecorder');\n         * }).catch((err: BusinessError) => {\n         *     console.info('Failed to stop avScreenCaptureRecorder, error: ' + err.message);\n         * })\n         */\n        stopRecording(): Promise<void>;\n        /**\n         * During screen capture, the application can exempt its privacy windows from security purposes.\n         * This API uses a promise to return the result.\n         * For example, if a user enters a password in this application during screen capture,\n         * the application will not display a black screen.\n         * @param { Array<number> } windowIDs - IDs of windows that require privacy exemption, including the main window\n         * IDs and subwindow IDs. For details about how to obtain window properties.\n         * @returns { Promise<void> } Promise used to return the window IDs.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * let windowIDs = [];\n         * avScreenCaptureRecorder.skipPrivacyMode(windowIDs).then(() => {\n         *     console.info('Succeeded in skipping privacy mode');\n         * }).catch((err: BusinessError) => {\n         *     console.info('Failed to skip privacy mode, error: ' + err.message);\n         * })\n         */\n        skipPrivacyMode(windowIDs: Array<number>): Promise<void>;\n        /**\n         * Enables or disables the microphone. This API uses a promise to return the result.\n         * @param { boolean } enable - Whether to enable or disable the microphone. The value **true** means to enable\n         * the microphone, and **false** means the opposite.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avScreenCaptureRecorder.setMicEnabled(true).then(() => {\n         *     console.info('Succeeded in setMicEnabled avScreenCaptureRecorder');\n         * }).catch((err: BusinessError) => {\n         *     console.info('Failed to setMicEnabled avScreenCaptureRecorder, error: ' + err.message);\n         * })\n         */\n        setMicEnabled(enable: boolean): Promise<void>;\n        /**\n         * Releases this **AVScreenCaptureRecorder** instance. This API uses a promise to return the result.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * import { BusinessError } from '@kit.BasicServicesKit';\n         *\n         * avScreenCaptureRecorder.release().then(() => {\n         *     console.info('Succeeded in releasing avScreenCaptureRecorder');\n         * }).catch((err: BusinessError) => {\n         *     console.info('Faile to release avScreenCaptureRecorder, error: ' + err.message);\n         * })\n         */\n        release(): Promise<void>;\n        /**\n         * Subscribes to screen capture state changes. An application can subscribe to only one screen capture\n         * state change event. When the application initiates multiple subscriptions to this event,\n         * the last subscription is applied.\n         * @param { 'stateChange' } type - Event type, which is **'stateChange'** in this case.\n         * @param { Callback<AVScreenCaptureStateCode> } callback - Callback invoked when the event is triggered.\n         * AVScreenCaptureStateCode indicates the new state.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * avScreenCaptureRecorder.on('stateChange', (state: media.AVScreenCaptureStateCode) => {\n         *     console.info('avScreenCaptureRecorder stateChange to ' + state);\n         * })\n         */\n        on(type: 'stateChange', callback: Callback<AVScreenCaptureStateCode>): void;\n        /**\n         * Subscribes to AVScreenCaptureRecorder errors. You can handle the errors based on the application logic.\n         * An application can subscribe to only one AVScreenCaptureRecorder error event.\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'error' } type - Event type, which is **'error'** in this case.\n         * @param { ErrorCallback } callback - Callback invoked when the event is triggered.\n         * @throws { BusinessError } 201 - permission denied.\n         * @throws { BusinessError } 5400103 - IO error. Return by ErrorCallback.\n         * @throws { BusinessError } 5400105 - Service died. Return by ErrorCallback.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * avScreenCaptureRecorder.on('error', (err: BusinessError) => {\n         *     console.error('avScreenCaptureRecorder error:' + err.message);\n         * })\n         */\n        on(type: 'error', callback: ErrorCallback): void;\n        /**\n         * Unsubscribes from screen capture state changes. You can specify a callback to cancel the specified subscription.\n         * @param { 'stateChange' } type - Event type, which is **'stateChange'** in this case.\n         * @param { Callback<AVScreenCaptureStateCode> } callback - Callback used for unsubscription.\n         * AVScreenCaptureStateCode indicates the new state. If this parameter is not specified,\n         * the last subscription is canceled.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * avScreenCaptureRecorder.off('stateChange');\n         */\n        off(type: 'stateChange', callback?: Callback<AVScreenCaptureStateCode>): void;\n        /**\n         * Unsubscribes from AVScreenCaptureRecorder errors. You can specify a callback to cancel\n         * the specified subscription.\n         * @param { 'error' } type - Event type, which is **'error'** in this case.\n         * @param { ErrorCallback } callback - Callback used for unsubscription. If this parameter is not specified,\n         * the last subscription is canceled.\n         * @syscap SystemCapability.Multimedia.Media.AVScreenCapture\n         * @since 12\n         * @example\n         * avScreenCaptureRecorder.off('error');\n         */\n        off(type: 'error', callback?: ErrorCallback): void;\n    }\n    /**\n     * Describes the video transcoding parameters.\n     *\n     * @typedef AVTranscoderConfig\n     * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n     * @since 12\n     */\n    interface AVTranscoderConfig {\n        /**\n         * Bitrate of the output audio, in bit/s. The value range is [1-500000]. The default value is 48 kbit/s.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        audioBitrate?: number;\n        /**\n         * Encoding format of the output audio. Currently, only AAC is supported. The default value is **AAC**.\n         * @type { ?CodecMimeType }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        audioCodec?: CodecMimeType;\n        /**\n         * Container format of the output video file. Currently, only MP4 is supported.\n         * @type { ContainerFormatType }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        fileFormat: ContainerFormatType;\n        /**\n         * Bitrate of the output video, in bit/s. The default bitrate depends on the resolution of the output video.\n         * The default bitrate is 1 Mbit/s for the resolution in the range [240p, 480P],\n         * 2 Mbit/s for the range (480P,720P], 4 Mbit/s for the range (720P,1080P], and 8 Mbit/s for 1080p or higher.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        videoBitrate?: number;\n        /**\n         * Encoding format of the output video. Currently, only AVC and HEVC are supported.\n         * If the source video is in HEVC format, the default value is **HEVC**. Otherwise, the default value is **AVC**.\n         * @type { ?CodecMimeType }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        videoCodec?: CodecMimeType;\n        /**\n         * Width of the output video frame, in px. The value range is [240 - 3840].\n         * The default value is the width of the source video frame.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        videoFrameWidth?: number;\n        /**\n         * Height of the output video frame, in px. The value range is [240 - 2160].\n         * The default value is the height of the source video frame.\n         * @type { ?number }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        videoFrameHeight?: number;\n    }\n    /**\n     * A transcoding management class that provides APIs to transcode videos. Before calling any API in **AVTranscoder**,\n     * you must use [createAVTranscoder()]{@link #createAVTranscoder} to create an **AVTranscoder** instance.\n     *\n     * @typedef AVTranscoder\n     * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n     * @since 12\n     */\n    interface AVTranscoder {\n        /**\n         * Source media file descriptor, which specifies the data source.\n         *\n         * **Example:**\n         *\n         * There is a media file that stores continuous assets, the address offset is 0, and the byte length is 100.\n         * Its file descriptor is **AVFileDescriptor { fd = resourceHandle; offset = 0; length = 100; }**.\n         *\n         * **NOTE**\n         * - After the resource handle (FD) is transferred to an **AVTranscoder** instance, do not use the resource handle\n         * to perform other read and write operations, including but not limited to transferring this handle to other\n         * **AVPlayer**, **AVMetadataExtractor**, **AVImageGenerator**, or **AVTranscoder** instance.\n         * Competition occurs when multiple **AVTranscoders** use the same resource handle to read and write files\n         * at the same time, resulting in errors in obtaining data.\n         * @type { AVFileDescriptor }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        fdSrc: AVFileDescriptor;\n        /**\n         * Destination media file descriptor, which specifies the data source. After creating an **AVTranscoder** instance,\n         * you must set both **fdSrc** and **fdDst**.\n         *\n         * **NOTE**\n         * - After the resource handle (FD) is transferred to an **AVTranscoder** instance, do not use the resource handle\n         * to perform other read and write operations, including but not limited to transferring this handle to other\n         * **AVPlayer**, **AVMetadataExtractor**, **AVImageGenerator**, or **AVTranscoder** instance.\n         * Competition occurs when multiple AVTranscoders use the same resource handle to read and write files\n         * at the same time, resulting in errors in obtaining data.\n         * @type { number }\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        fdDst: number;\n        /**\n         * Sets video transcoding parameters. This API uses a promise to return the result.\n         * @param { AVTranscoderConfig } config - Video transcoding parameters to set.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 401 - The parameter check failed. Return by promise.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        prepare(config: AVTranscoderConfig): Promise<void>;\n        /**\n         * Starts transcoding. This API uses a promise to return the result.\n         *\n         * This API can be called only after the [prepare()]{@link AVTranscoder.prepare} API is called.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        start(): Promise<void>;\n        /**\n         * Pauses transcoding. This API uses a promise to return the result.\n         *\n         * This API can be called only after the [start()]{@link AVTranscoder.start} API is called.\n         * You can call [resume()]{@link AVTranscoder.resume} to resume transcoding.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        pause(): Promise<void>;\n        /**\n         * Resumes transcoding. This API uses a promise to return the result.\n         *\n         * This API can be called only after the [pause()]{@link AVTranscoder.pause} API is called.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        resume(): Promise<void>;\n        /**\n         * Cancels transcoding. This API uses a promise to return the result.\n         * This API can be called only after the [prepare()]{@link AVTranscoder.prepare}, [start()]{@link AVTranscoder.start},\n         * [pause()]{@link AVTranscoder.pause}, or [resume()]{@link AVTranscoder.resume} API is called.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400103 - IO error. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        cancel(): Promise<void>;\n        /**\n         * Releases the video transcoding resources. This API uses a promise to return the result.\n         *\n         * After the resources are released, you can no longer perform any operation on the **AVTranscoder** instance.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise.\n         * @throws { BusinessError } 5400105 - Service died. Return by promise.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        release(): Promise<void>;\n        /**\n         * Subscribes to the event indicating that transcoding is complete.\n         * An application can subscribe to only one transcoding completion event.\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         *\n         * When this event is reported, the current transcoding operation is complete.\n         * You need to call [release()]{@link AVTranscoder.release} to exit the transcoding.\n         * @param { 'complete' } type - Event type, which is **'complete'** in this case.\n         * This event is triggered by the system during transcoding.\n         * @param { Callback<void> } callback - Callback that has been registered to listen for\n         * transcoding completion events.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        on(type: 'complete', callback: Callback<void>): void;\n        /**\n         * Subscribes to AVTranscoder errors. If this event is reported, call [release()]{@link AVTranscoder.release}\n         * to exit the transcoding.\n         *\n         * An application can subscribe to only one AVTranscoder error event.\n         * When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'error' } type - Event type, which is **'error'** in this case.\n         *\n         * This event is triggered when an error occurs during transcoding.\n         * @param { ErrorCallback } callback - Callback invoked when the event is triggered.\n         * @throws { BusinessError } 401 - The parameter check failed.\n         * @throws { BusinessError } 801 - Capability not supported.\n         * @throws { BusinessError } 5400101 - No memory.\n         * @throws { BusinessError } 5400102 - Operation not allowed.\n         * @throws { BusinessError } 5400103 - I/O error.\n         * @throws { BusinessError } 5400104 - Time out.\n         * @throws { BusinessError } 5400105 - Service died.\n         * @throws { BusinessError } 5400106 - Unsupported format.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        on(type: 'error', callback: ErrorCallback): void;\n        /**\n         * Subscribes to transcoding progress updates. An application can subscribe to only one transcoding progress update\n         * event. When the application initiates multiple subscriptions to this event, the last subscription is applied.\n         * @param { 'progressUpdate' } type - Event type, which is **'progressUpdate'** in this case.\n         * This event is triggered by the system during transcoding.\n         * @param { Callback<number> } callback - Callback invoked when the event is triggered.\n         * **progress** is a number that indicates the current transcoding progress.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        on(type: 'progressUpdate', callback: Callback<number>): void;\n        /**\n         * Unsubscribes from the event indicating that transcoding is complete.\n         * @param { 'complete' } type - Event type, which is **'complete'** in this case.\n         * This event can be triggered by both user operations and the system.\n         * @param { Callback<void> } callback - Callback that has been registered to listen for\n         * transcoding completion events.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        off(type: 'complete', callback?: Callback<void>): void;\n        /**\n         * Unsubscribes from AVTranscoder errors. After the unsubscription, your application can no longer\n         * receive AVTranscoder errors.\n         * @param { 'error' } type - \tEvent type, which is **'error'** in this case.\n         *\n         * This event is triggered when an error occurs during transcoding.\n         * @param { ErrorCallback } callback - Callback that has been registered to listen for AVTranscoder errors.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        off(type: 'error', callback?: ErrorCallback): void;\n        /**\n         * Unsubscribes from transcoding progress updates.\n         * @param { 'progressUpdate' } type - Event type, which is **'progressUpdate'** in this case.\n         * This event can be triggered by both user operations and the system.\n         * @param { Callback<number> } callback - Called that has been registered to listen for progress updates.\n         * You are advised to use the default value because only the last registered callback is retained in the current\n         * callback mechanism.\n         * @syscap SystemCapability.Multimedia.Media.AVTranscoder\n         * @since 12\n         */\n        off(type: 'progressUpdate', callback?: Callback<number>): void;\n    }\n}\nexport default media;\n",
}
export default FILE;